0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00
ghost/test/utils
Hannah Wolfe d50fb7c922
Added global setup to reset DB before test run
- We've been seeing weird errors with tables not existing when running tests locally
- This appears to happen after an error causes the tests to abort
- This change includes two fixes:
1. we triggers a full DB reset just before the entire test suite runs
 - this is done by wrapping the override file for tests that use a db, and supplying a mochaGlobalSetup hook
2. catch errors when attempting to do a fast truncation-based reset & init, and do a full reset & init instead

- These two changes should ensure the DB is always in the state we expect when running a new test suite
2022-03-16 20:56:17 +00:00
..
fixtures Removed archived tiers from content api (#14329) 2022-03-16 22:02:42 +05:30
mocks Colocated mock-express style utilities 2021-10-20 13:18:35 +01:00
admin-api-test-agent.js Extracted TestAgent class for test utils 2022-02-21 11:19:07 +07:00
admin-utils.js Improved dev tooling (#13118) 2021-07-05 20:02:22 +01:00
api.js Fixed handing test suite 2021-12-09 13:52:02 +04:00
assertions.js
configUtils.js
content-api-test-agent.js Added ContentAPITestAgent 2022-02-23 17:08:56 +07:00
db-overrides.js Added global setup to reset DB before test run 2022-03-16 20:56:17 +00:00
db-utils.js Added global setup to reset DB before test run 2022-03-16 20:56:17 +00:00
e2e-framework-mock-manager.js Added disableStripe method to mock manager 2022-03-10 11:35:03 +00:00
e2e-framework.js Aliased canary endpoints to point to non-versioned URLs 2022-03-14 21:22:54 +13:00
e2e-utils.js Added settingsCache handling to e2e-framework 2022-02-11 16:24:24 +00:00
fixture-utils.js Removed archived tiers from content api (#14329) 2022-03-16 22:02:42 +05:30
index.js Fixed bad setup call in settings integration test 2022-03-16 14:03:02 +00:00
members-api-test-agent.js Extracted TestAgent class for test utils 2022-02-21 11:19:07 +07:00
overrides.js Added global setup to reset DB before test run 2022-03-16 20:56:17 +00:00
redirects.js
test-agent.js Removed @tryghost/jest-snapshot dependency 2022-02-22 09:41:58 +07:00
url-service-utils.js Removed unused parameter from isFinished method 2021-11-24 05:32:20 +13:00
urlUtils.js Updated test UrlUtils to use canary by default 2022-01-21 15:12:27 +00:00