0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00
ghost/test
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
..
e2e-api Moved locale testing out of casper fixture (#13850) 2021-12-06 15:11:54 +00:00
e2e-frontend Removed unused sinon referece 2021-11-30 20:14:51 +13:00
e2e-server Fixed ETag header for admin templates not changing between versions (#13680) 2021-10-22 14:25:58 +01:00
integration Removed unnecessary rewire call 2021-11-22 14:53:16 +04:00
regression Cleaned up mock-express tests from unnecessary inits 2021-12-06 21:28:53 +13:00
unit Moved locale testing out of casper fixture (#13850) 2021-12-06 15:11:54 +00:00
utils Copied DB for faster SQLite tests 2021-12-06 15:22:44 +00:00
.eslintignore
.eslintrc.js Upgraded no-skipped-test rule to error 2021-05-26 14:57:43 +01:00
.jshintrc