Skip to content

Commit 6e515d5

Browse files
committed
Refactor API module
Remove indirection by inlining code. It's not the prettiest without async-await but it's easier to follow. Remove unnecessary auto-binding of methods. There's no need to "get" blank results either when running a test files fails. Handle timeouts within a test run, without touching the `runStatus` object. Restart the timeout timer whenever a new "fork" is created. This gives new test files the chance to start running tests. Don't start the timer *before* running any tests. Fixes #1377. Clean up "fork" instances when test files exit. Set up a new precompiler on every test run. Don't store it on the `Api` instance. If caching is enabled, fix the caching directory relative to the project directory, without looking it up again. Compile all test and helpers files before running any test. This doesn't improve time-to-first-test but it does mean that test files can depend on each other. AVA will correctly load the precompiled file. No tests are run if any file fails to compile. Pass the real path to the precompiler. Compute `execArgv` when a test file is run, not all at once for all files.
1 parent 9e508ad commit 6e515d5

File tree

5 files changed

+171
-242
lines changed

5 files changed

+171
-242
lines changed

0 commit comments

Comments
 (0)