Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Options" heading in doc files (and consistent level 2 heading) #233

Merged
merged 1 commit into from
Feb 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/rules/max-top-level-suites.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ describe('foo', function () {
});
```

## Options

If you want to change the suite limit to, for instance, 2 suites per file:

```js
Expand Down
4 changes: 2 additions & 2 deletions docs/rules/no-exclusive-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ suite.skip("bar", function () {});
test.skip("bar", function () {});
```

# Options
## Settings

This rule supports the following shared configuration options:
This rule supports the following shared configuration setting:

* `additionalTestFunctions`: An array of extra test functions to protect. This might be used with a custom Mocha extension, such as [`ember-mocha`](https://github.com/switchfly/ember-mocha)

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-hooks-for-single-case.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('foo', function () {
});
```

# Options
## Options

This rule supports the following options:

Expand Down
4 changes: 2 additions & 2 deletions docs/rules/no-skipped-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ suite.only("bar", function () {});
test.only("bar", function () {});
```

# Options
## Settings

This rule supports the following shared configuration options:
This rule supports the following shared configuration settings:

* `additionalTestFunctions`: An array of extra test functions to protect. This might be used with a custom Mocha extension, such as [`ember-mocha`](https://github.com/switchfly/ember-mocha)
* `additionalXFunctions`: An array of extra x-function to protect
Expand Down
5 changes: 3 additions & 2 deletions docs/rules/no-synchronous-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ By default, this rule looks for the presence of one of:
- An async function provided to a mocha test statement.
- A return statement within the function body of any mocha test statement.

If none of these three options is used in a test method, the rule will raise a warning.
If none of these three alternatives is used in a test method, the rule will raise a warning.

The following patterns are considered warnings:

Expand Down Expand Up @@ -40,6 +40,8 @@ it('should do foo', function () {
}
```

## Options

You can change the acceptable asynchronous test methods to only allow a combination of async functions/callbacks/promises:

```js
Expand All @@ -48,7 +50,6 @@ rules: {
},
```


### Caveats:

This rule cannot guarantee that a returned function call is actually a promise, it only confirms that the return was made.
Expand Down
2 changes: 2 additions & 0 deletions docs/rules/valid-suite-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ context("Test suite", function() { });
suite("Test suite", function() { });
```

## Options

There is also possible to configure a custom list of suite names and a custom error message via the second and third rule configuration option:

```js
Expand Down
2 changes: 2 additions & 0 deletions docs/rules/valid-test-description.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ This rule enforces the test descriptions to follow the desired format.
By default, the regular expression is configured to be "^should" which requires test descriptions to start with "should".
By default, the rule supports "it", "specify" and "test" test function names, but it can be configured to look for different test names via rule configuration.

## Options

Example of a custom rule configuration:

```js
Expand Down