To organize tests in multiple files, only call run() in the entry file, such as
index.ts. This ensures that there is a single report for all tests.
import'./test-1' import'./test-2'
run()
Alternatively, if there are test files that also call run(), such as in a monorepo,
pass a function that dynamically imports them. This enqueues all tests and runs them
together with a single report at the end.
Run all tests that have been enqueued.
To organize tests in multiple files, only call
run()in the entry file, such asindex.ts. This ensures that there is a single report for all tests.Alternatively, if there are test files that also call
run(), such as in a monorepo, pass a function that dynamically imports them. This enqueues all tests and runs them together with a single report at the end.