0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/test/utils
Daniel Lockyer a3cc66be50 Copied DB for faster SQLite tests
refs https://github.com/TryGhost/Toolbox/issues/136

- we nuke and reinitialize the DB many times between tests
- this forms a good portion of the time taken and we shouldn't be spending
  so much time on just resetting the DB back to a known state
- this commit switches out the knex-migrator reset + init calls for SQLite to
  a function which keeps a clean copy of the DB and copies the file back
  when we "reset"
- for MySQL, existing functionality is kept
- this massively speeds up tests because it saves ~700ms+ for every reset
- whilst this change seems to work, it's just the start so there's a
  lot more refactoring needed. this change is currently gated to CI until
  it's deemed safe/sane enough to run on local machines without blowing
  up
2021-12-06 15:22:44 +00:00
..
fixtures Moved locale testing out of casper fixture (#13850) 2021-12-06 15:11:54 +00:00
mocks Colocated mock-express style utilities 2021-10-20 13:18:35 +01:00
admin-utils.js Improved dev tooling (#13118) 2021-07-05 20:02:22 +01:00
api.js Switch to @tryghost/errors from ignition errors package (#13807) 2021-12-01 10:22:01 +00:00
assertions.js
configUtils.js
db-utils.js Copied DB for faster SQLite tests 2021-12-06 15:22:44 +00:00
e2e-utils.js Copied DB for faster SQLite tests 2021-12-06 15:22:44 +00:00
fixture-utils.js Refactored fixtures to be loaded by fixture manager 2021-11-16 11:17:03 +00:00
index.js Added extra debug to test utilities 2021-11-19 10:47:21 +00:00
overrides.js Improved dev tooling (#13118) 2021-07-05 20:02:22 +01:00
redirects.js
url-service-utils.js Removed unused parameter from isFinished method 2021-11-24 05:32:20 +13:00
urlUtils.js Swapped out usage of stubUrlUtils for configUtils 2021-06-21 11:07:30 +01:00