You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow customized sorting of test files prior to execution
This allows you to better control the distribution of test files across parallel runs. You can also control execution order for regular runs, including on your local machine.
Co-authored-by: Mark Wubben <mark@novemberborn.net>
Copy file name to clipboardExpand all lines: docs/06-configuration.md
+1
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,7 @@ Arguments passed to the CLI will always take precedence over the CLI options con
58
58
-`require`: extra modules to require before tests are run. Modules are required in the [worker processes](./01-writing-tests.md#process-isolation)
59
59
-`timeout`: Timeouts in AVA behave differently than in other test frameworks. AVA resets a timer after each test, forcing tests to quit if no new test results were received within the specified timeout. This can be used to handle stalled tests. See our [timeout documentation](./07-test-timeouts.md) for more options.
60
60
-`nodeArguments`: Configure Node.js arguments used to launch worker processes.
61
+
-`sortTestFiles`: A comparator function to sort test files with. Available only when using a `ava.config.*` file. See an example use case [here](recipes/splitting-tests-ci.md).
61
62
62
63
Note that providing files on the CLI overrides the `files` option.
AVA automatically detects whether your CI environment supports parallel builds using [ci-parallel-vars](https://www.npmjs.com/package/ci-parallel-vars). When parallel builds support is detected, AVA sorts the all detected test files by name, and splits them into chunks. Each CI machine is assigned a chunk (subset) of the tests, and then each chunk is run in parallel.
4
+
5
+
To better distribute the tests across the machines, you can configure a custom comparator function:
0 commit comments