-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
34 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import realUserEvent from "@testing-library/user-event"; | ||
|
||
/** | ||
* Setup user-event instance with custom defaults | ||
*/ | ||
export function userEventSetup( | ||
options: Parameters<typeof realUserEvent["setup"]>[0] = {} | ||
): ReturnType<typeof realUserEvent["setup"]> { | ||
return realUserEvent.setup({ | ||
advanceTimers: jest.advanceTimersByTime, | ||
...options, | ||
}); | ||
} |
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,8 @@ | ||
import "@testing-library/jest-dom"; | ||
import "whatwg-fetch"; | ||
|
||
import { configure } from "@testing-library/react"; | ||
|
||
configure({ | ||
throwSuggestions: true, | ||
}); |
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 @@ | ||
import path from "path"; | ||
|
||
export default function teardown(): void { | ||
console.log(` | ||
================================================================================ | ||
View Coverage Report (Open in Browser): ${path.relative( | ||
process.cwd(), | ||
path.join(__dirname, "../coverage/lcov-report/index.html") | ||
)} | ||
================================================================================ | ||
`); | ||
} |
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