icefoganalytics / travel-authorization

0 stars 0 forks source link

Switch Test Suite from Jest to Vitest #208

Closed klondikemarlen closed 2 months ago

klondikemarlen commented 4 months ago

Relates to:

Context

Is your feature request related to a problem? Please describe. Jest is slow, the docs are hard to read, and the behaviour doesn't play well with Sequelize 7. Vitest is fast, the docs are easy to read, and it works well with Sequelize 7. It even has full Jest expectation support, so the transition is quite smooth.

Most importanly! Vitest has precise file watching, so that if you edit a file in watch mode, it only runs the tests that effect that file. This is a vast UX improvement over Jest which requires to you manually specify only watching a single file, each time, or to run the whole suite.

Describe the solution you'd like Switch our test suite from Jest to Vitest.

Describe alternatives you've considered Keep using Jest - it works ok for now, not great, but ok. Switch to Mocha + TS-Mocha + Chai - much harder migration, with no clear gain over switching to Vitest, which has both Chai and Jest support.