0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/core/test/utils/fixtures
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
..
app
config
csv
data feature: define redirects in a custom file (#7719) (#7945) 2017-02-06 15:32:40 +01:00
export 🐛 Fixed importer bug: can't resolve authors relation 2018-04-10 01:10:06 +02:00
filter-param Multiple authors (#9426) 2018-03-27 15:16:15 +01:00
images 🎨 Blog icon improvements (#8260) 2017-04-11 13:40:17 +02:00
import 🙀 Image field naming & new img_url helper (#8364) 2017-04-24 18:21:47 +01:00
settings Renamed resources to taxonomies in default routes yaml file 2018-04-21 01:17:52 +02:00
themes Theme translations and blog localisation (#8437) 2018-01-09 14:50:57 +01:00
data-generator.js Use Bookshelf in our test env (#9592) 2018-04-25 17:13:35 +02:00
example.js
test.hbs