-
Notifications
You must be signed in to change notification settings - Fork 467
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Add toHaveClass custom matcher * Add documentation in the README * Handle the case where an element has no class
- Loading branch information
Showing
4 changed files
with
104 additions
and
2 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 |
---|---|---|
@@ -1,4 +1,9 @@ | ||
import extensions from './jest-extensions' | ||
|
||
const {toBeInTheDOM, toHaveTextContent, toHaveAttribute} = extensions | ||
expect.extend({toBeInTheDOM, toHaveTextContent, toHaveAttribute}) | ||
const { | ||
toBeInTheDOM, | ||
toHaveTextContent, | ||
toHaveAttribute, | ||
toHaveClass, | ||
} = extensions | ||
expect.extend({toBeInTheDOM, toHaveTextContent, toHaveAttribute, toHaveClass}) |
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