0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/test/integration
Katharina Irrgang e23fd511eb
Use Bookshelf in our test env (#9592)
refs #9601

- replace raw knex queries by Bookshelf queries
- optimise lot's of test setups, so we don't experience a massive slow down in the test run
- this has troubled in the past e.g. with normalisation, any custom model logic - the test env always had to simulate things
- there are for sure thousands things which can be optimised now, but because of time, we do them step by step
- this is especially important for the url service (https://github.com/TryGhost/Ghost/issues/9601), because we have to ensure that inserting/updating/removing resources will trigger model events

`grunt test-all` with SQLite finishes in 2,5-3min. (on master: 1-2min) 
`grunt test-all` with MySQL finishes in 4min. (on master: 3min)

**NOTE: We want to move as much as possible routing and integration tests to unit tests. This will speed up the test run again.** See #9342. But we need to find time for that. Any help is welcome!
2018-04-25 17:13:35 +02:00
..
api Use Bookshelf in our test env (#9592) 2018-04-25 17:13:35 +02:00
data/importer/importers Use Bookshelf in our test env (#9592) 2018-04-25 17:13:35 +02:00
model Use Bookshelf in our test env (#9592) 2018-04-25 17:13:35 +02:00
export_spec.js Moved ghost-version to lib 2017-12-14 22:14:55 +01:00
migration_spec.js Sorted out the mixed usages of include and withRelated (#9425) 2018-02-15 10:53:53 +01:00
site_spec.js 🐛Fixed asset redirects (#9455) 2018-02-14 17:21:31 +01:00
update_check_spec.js Use Bookshelf in our test env (#9592) 2018-04-25 17:13:35 +02:00