Skip to content

Commit

Permalink
docs: Add info about available Mocha env variables
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Jelinek <[email protected]>
  • Loading branch information
djelinek committed Apr 30, 2024
1 parent 4e1c226 commit 6a5dd07
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/Mocha-Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,15 @@ const options: MochaOptions = {

export default options;
```

### ENV variables for Mocha options

We are supporting only `MOCHA_GREP` and `MOCHA_INVERT` variables at the moment. It allows simpler overriding that options without need of modifying the Mocha config files.

```shell
# Run the test case whose name is "ExtensionsView"
MOCHA_GREP="ExtensionsView" npm run test

# Run the test cases whose name is NOT "ExtensionsView"
MOCHA_GREP="ExtensionsView" MOCHA_INVERT=true npm run test
```

0 comments on commit 6a5dd07

Please sign in to comment.