From e5b355d498391cf6b2a22f7a135da04dc76dcaa9 Mon Sep 17 00:00:00 2001 From: Romain Lebesle Date: Sun, 27 Oct 2024 14:25:01 +0100 Subject: [PATCH] Link to CLI options to clarify how to run tests in separate processes Co-authored-by: Mark Wubben --- docs/01-writing-tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/01-writing-tests.md b/docs/01-writing-tests.md index 84836a1a5..91f7bbb96 100644 --- a/docs/01-writing-tests.md +++ b/docs/01-writing-tests.md @@ -10,7 +10,7 @@ AVA tries to run test files with their current working directory set to the dire ## Test isolation -By default each test file is run in a new worker thread. You can fall back running in separate processes. +By default each test file is run in a new worker thread. You can fall back running in separate processes (see `workerThreads` [CLI option](./06-configuration.md#options)). AVA will set `process.env.NODE_ENV` to `test`, unless the `NODE_ENV` environment variable has been set. This is useful if the code you're testing has test defaults (for example when picking what database to connect to). It may cause your code or its dependencies to behave differently though. Note that `'NODE_ENV' in process.env` will always be `true`.