Skip to content

Commit fdb229b

Browse files
author
bojavou
committed
Document threadArgumentsFilter
1 parent e39f509 commit fdb229b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/06-configuration.md

+15
Original file line numberDiff line numberDiff line change
@@ -337,3 +337,18 @@ These may also export a function which is then invoked, and can receive argument
337337
The `nodeArguments` configuration may be used to specify additional arguments for launching worker processes. These are combined with `--node-arguments` passed on the CLI and any arguments passed to the `node` binary when starting AVA.
338338

339339
[CLI]: ./05-command-line.md
340+
341+
## Thread arguments filter
342+
343+
In a config file only, `threadArgumentsFilter` may provide a function used for filtering `nodeArguments` sent to worker threads. This enables excluding arguments that throw if sent to a thread. The filter is ignored by worker processes.
344+
345+
```js
346+
const processOnly = new Set([
347+
'--allow-natives-syntax',
348+
'--expose-gc'
349+
]);
350+
351+
export default {
352+
threadArgumentsFilter: argument => !processOnly.has(argument)
353+
}
354+
```

0 commit comments

Comments
 (0)