Skip to content

Commit b269e88

Browse files
committed
docs: correct grammatical & spelling errors
1 parent e095874 commit b269e88

10 files changed

+15
-18
lines changed

docs/rules/consistent-test-it.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ describe('foo', function() {
7171

7272
### Default configuration
7373

74-
The default configuration forces top level test to use `test` and all tests
74+
The default configuration forces all top-level tests to use `test` and all tests
7575
nested within `describe` to use `it`.
7676

7777
```js

docs/rules/no-export.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
# Disallow using `exports` in files containing tests (`no-export`)
22

3-
Prevents exports from test files. If a file has at least 1 test in it, then this
4-
rule will prevent exports.
3+
Prevents using `exports` if a file has one or more tests in it.
54

65
## Rule Details
76

87
This rule aims to eliminate duplicate runs of tests by exporting things from
98
test files. If you import from a test file, then all the tests in that file will
109
be run in each imported instance, so bottom line, don't export from a test, but
11-
instead move helper functions into a seperate file when they need to be shared
10+
instead move helper functions into a separate file when they need to be shared
1211
across tests.
1312

1413
Examples of **incorrect** code for this rule:

docs/rules/prefer-inline-snapshots.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ This rule has been deprecated in favor of
2121

2222
---
2323

24-
In order to make snapshot tests more managable and reviewable
24+
In order to make snapshot tests more manageable and reviewable
2525
`toMatchInlineSnapshot()` and `toThrowErrorMatchingInlineSnapshot` should be
26-
used to write the snapshots inline in the test file.
26+
used to write the snapshots' inline in the test file.
2727

2828
## Rule details
2929

docs/rules/prefer-to-be-null.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Suggest using `toBeNull()` (`prefer-to-be-null`)
22

33
In order to have a better failure message, `toBeNull()` should be used upon
4-
asserting expections on null value.
4+
asserting expectations on null value.
55

66
## Rule details
77

docs/rules/prefer-to-be-undefined.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Suggest using `toBeUndefined()` (`prefer-to-be-undefined`)
22

33
In order to have a better failure message, `toBeUndefined()` should be used upon
4-
asserting expections on undefined value.
4+
asserting expectations on undefined value.
55

66
## Rule details
77

docs/rules/prefer-to-have-length.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Suggest using `toHaveLength()` (`prefer-to-have-length`)
22

33
In order to have a better failure message, `toHaveLength()` should be used upon
4-
asserting expectations on object's length property.
4+
asserting expectations on objects length property.
55

66
## Rule details
77

88
This rule triggers a warning if `toBe()`, `toEqual()` or `toStrictEqual()` is
9-
used to assert object's length property.
9+
used to assert objects length property.
1010

1111
```js
1212
expect(files.length).toBe(1);

docs/rules/prefer-todo.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ will be highlighted in the summary output.
55

66
## Rule details
77

8-
This rule triggers a warning if empty test case is used without 'test.todo'.
8+
This rule triggers a warning if empty test cases are used without 'test.todo'.
99

1010
```js
1111
test('i need to write this test');

docs/rules/require-to-throw-message.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Require a message for `toThrow()` (`require-to-throw-message`)
22

3-
`toThrow()`, and its alias `toThrowError()`, are used to check if an error is
3+
`toThrow()` (and its alias `toThrowError()`) is used to check if an error is
44
thrown by a function call, such as in `expect(() => a()).toThrow()`. However, if
55
no message is defined, then the test will pass for any thrown error. Requiring a
66
message ensures that the intended error is thrown.

docs/rules/require-top-level-describe.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
Jest allows you to organise your test files the way you want it. However, the
44
more your codebase grows, the more it becomes hard to navigate in your test
5-
files. This rule makes sure that you provide at least a top-level describe block
6-
in your test file.
5+
files. This rule makes sure you provide at least a top-level `describe` block in
6+
your test file.
77

88
## Rule Details
99

docs/rules/valid-expect-in-promise.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ promise
55

66
## Rule details
77

8-
This rule triggers a warning if,
9-
10-
- test is having assertions in `then` or `catch` block of a promise
11-
- and that promise is not returned from the test
8+
This rule looks for tests that have assertions in `then` and `catch` methods on
9+
promises that are not returned by the test.
1210

1311
### Default configuration
1412

0 commit comments

Comments
 (0)