Skip to content

Commit

Permalink
Document threadArgumentsFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
bojavou committed Jul 22, 2024
1 parent e39f509 commit fdb229b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/06-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,3 +337,18 @@ These may also export a function which is then invoked, and can receive argument
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.

[CLI]: ./05-command-line.md

## Thread arguments filter

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.

```js
const processOnly = new Set([
'--allow-natives-syntax',
'--expose-gc'
]);

export default {
threadArgumentsFilter: argument => !processOnly.has(argument)
}
```

0 comments on commit fdb229b

Please sign in to comment.