-
Notifications
You must be signed in to change notification settings - Fork 140
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
1 parent
a19e85d
commit 6ca471a
Showing
6 changed files
with
6,272 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.config.js linguist-detectable=false |
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 { render, screen } from "@testing-library/react"; | ||
import Error from "next/error"; | ||
|
||
it("renders a not found message on 404 code", () => { | ||
render(<Error statusCode={404} />); | ||
expect(screen.getByText(/this page could not be found/i)).toBeVisible(); | ||
}); | ||
|
||
it("renders the correct status code", () => { | ||
const code = Math.floor(Math.random() * 500) + 100; | ||
render(<Error statusCode={code} />); | ||
expect(screen.getByText(code)).toBeVisible(); | ||
}); |
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,17 @@ | ||
module.exports = { | ||
transform: { | ||
'^.+\\.(js|jsx|ts|tsx)$': 'babel-jest' | ||
}, | ||
transformIgnorePatterns: [ | ||
'[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs|cjs|ts|tsx)$', | ||
'^.+\\.module\\.(css|sass|scss)$', | ||
], | ||
testMatch: [ | ||
'<rootDir>/**/__tests__/**/*.{js,jsx,ts,tsx}', | ||
'<rootDir>/**/*.{spec,test}.{js,jsx,ts,tsx}', | ||
], | ||
setupFilesAfterEnv: [ | ||
"<rootDir>/setupTests.ts" | ||
], | ||
moduleFileExtensions: ["ts", "tsx", "js", "jsx"] | ||
} |
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 @@ | ||
import '@testing-library/jest-dom'; |
Oops, something went wrong.