-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: change extend-expect types definition to support explicit jest g…
…lobals (#137) Co-authored-by: Maciej Jastrzebski <[email protected]>
- Loading branch information
1 parent
fafd6ed
commit c3dc5ce
Showing
4 changed files
with
51 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// This file checks whether explicit Jest `extend` from '@jest/expect' is correctly extended with Jest Matchers. | ||
|
||
// eslint-disable-next-line import/no-extraneous-dependencies | ||
import { expect as jestExpect } from '@jest/globals'; | ||
|
||
jestExpect(null).toBeDisabled(); | ||
jestExpect(null).toBeEmptyElement(); | ||
jestExpect(null).toBeEnabled(); | ||
jestExpect(null).toBeVisible(); | ||
jestExpect(null).toContainElement(null); | ||
jestExpect(null).toHaveTextContent(''); | ||
jestExpect(null).toHaveProp('foo'); | ||
jestExpect(null).toHaveStyle({}); | ||
jestExpect(null).toHaveAccessibilityState({}); | ||
jestExpect(null).toHaveAccessibilityValue({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// This file checks whether implicit Jest `extend` is correctly extended with Jest Matchers. | ||
|
||
expect(null).toBeDisabled(); | ||
expect(null).toBeEmptyElement(); | ||
expect(null).toBeEnabled(); | ||
expect(null).toBeVisible(); | ||
expect(null).toContainElement(null); | ||
expect(null).toHaveTextContent(''); | ||
expect(null).toHaveProp('foo'); | ||
expect(null).toHaveStyle({}); | ||
expect(null).toHaveAccessibilityState({}); | ||
expect(null).toHaveAccessibilityValue({}); |