Skip to content

Commit

Permalink
Docs: Write documentation for new QUnit.config.failOnZeroTests option
Browse files Browse the repository at this point in the history
Ref #1617.
  • Loading branch information
Krinkle authored Jun 5, 2021
1 parent 67880d6 commit 75bbe0e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/config/QUnit.config.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ By default, QUnit's HTML reporter collapses consecutive failing tests showing on

This object isn't actually a configuration property, but is listed here anyway, as it's exported through `QUnit.config`. This gives you access to some QUnit internals at runtime. See below for an example.

### `QUnit.config.failOnZeroTests` (boolean) | default: `true`

Whether to fail the test run if no tests were run.

By default, it is considered an error if no tests were loaded, or if no tests matched the current filter. Turning this option off means an empty test run will result in a success instead.

* Version added: unreleased.

### `QUnit.config.filter` (string) | default: `undefined`

Allows you to filter which tests are run by matching the module name and test title against the provided string. You can do an inverse filter, matching all tests that don't contain the string, by prefixing a `!` to the value.
Expand Down

0 comments on commit 75bbe0e

Please sign in to comment.