JS/TS
vitest integration
When using typescript and vitest, the only thing you need to add is beforeAll
in your test file.
Setup
test_module.spec.ts
Running multiple tests
It’s often helpful to exercise the same test over multiple examples. To do this, we suggest doing a simple for loop to autogenerate your tests and for larger numbers of examples you can read from a file or other data structure.
typescript
Naming
Baserun lets you compare test results and debug each step side by side. We consider the full path of the describe and it names of the jest test as a unique identifier for the test. In the example above, two tests would be run and identified by ("Baserun end-to-end", "should suggest the Eiffel Tower")
and ("Baserun end-to-end", "should suggest the Colosseum")