Skip to content

Commit b531af8

Browse files
authored
docs(prefer-implicit-assert): typos in docs (#829)
1 parent 49ad68b commit b531af8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/rules/prefer-implicit-assert.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
<!-- end auto-generated rule header -->
44

55
Testing Library `getBy*` & `findBy*` queries throw an error if the element is not
6-
found. Therefore it is not necessary to also assert existance with things like `expect(getBy*.toBeInTheDocument()` or `expect(awaint findBy*).not.toBeNull()`
6+
found. Therefore it is not necessary to also assert existence with things like `expect(getBy*.toBeInTheDocument()` or `expect(await findBy*).not.toBeNull()`
77

88
## Rule Details
99

10-
This rule aims to reuduce uncecessary assertion's for presense of an element,
10+
This rule aims to reduce unnecessary assertion's for presence of an element,
1111
when using queries that implicitly fail when said element is not found.
1212

1313
Examples of **incorrect** code for this rule with the default configuration:
@@ -26,7 +26,7 @@ expect(utils.getByText('foo')).toBeInTheDocument();
2626
expect(await utils.findByText('foo')).toBeInTheDocument();
2727

2828
expect(await findByText('foo')).not.toBeNull();
29-
expect(await findByText('foo')).not.toBeUndified();
29+
expect(await findByText('foo')).not.toBeUndefined();
3030
```
3131

3232
Examples of **correct** code for this rule with the default configuration:
@@ -39,7 +39,7 @@ const utils = render(<Component />);
3939
utils.getByText('foo');
4040
await utils.findByText('foo');
4141

42-
// When using queryBy* queries thees do not implicitly fial therefore you should explicitly check if your elements eixst or not
42+
// When using queryBy* queries these do not implicitly fail therefore you should explicitly check if your elements exist or not
4343
expect(queryByText('foo')).toBeInTheDocument();
4444
expect(queryByText('foo')).not.toBeInTheDocument();
4545
```

0 commit comments

Comments
 (0)