-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #159 from msqd/mkui_tests
[READY] Mkui tests
- Loading branch information
Showing
39 changed files
with
3,909 additions
and
110 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 +1,2 @@ | ||
test-results | ||
coverage |
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,45 @@ | ||
const babelConfigEmotion = { | ||
presets: [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
targets: { node: "current" }, | ||
}, | ||
], | ||
[ | ||
"@babel/preset-react", | ||
{ | ||
runtime: "automatic", | ||
importSource: "@emotion/react", | ||
}, | ||
], | ||
"@babel/preset-typescript", | ||
], | ||
plugins: ["babel-plugin-macros", "@emotion/babel-plugin"], | ||
} | ||
|
||
/** @type {import('ts-jest').JestConfigWithTsJest} */ | ||
const customJestConfig = { | ||
setupFilesAfterEnv: ["<rootDir>/jest.setup.js"], | ||
testEnvironment: "jest-environment-jsdom", | ||
moduleNameMapper: { | ||
"^@/components/(.*)$": "<rootDir>/src/components/$1", | ||
"^@/pages/(.*)$": "<rootDir>/src/pages/$1", | ||
}, | ||
transform: { | ||
"^.+\\.(js|jsx|ts|tsx|mjs)$": ["babel-jest", babelConfigEmotion], | ||
"^.+\\.svg$": "<rootDir>/svgTransform.js", | ||
}, | ||
|
||
collectCoverageFrom: [ | ||
"src/**/*.{js,jsx,tsx}", | ||
"!<rootDir>/node_modules/", | ||
"!<rootDir>/**/*.stories.{js,jsx,ts,tsx}", | ||
"!<rootDir>/**/Styles/**/*.{js,jsx,ts,tsx}", | ||
], | ||
coverageDirectory: "<rootDir>/coverage", | ||
testPathIgnorePatterns: ["<rootDir>/tests/"], | ||
coverageReporters: ["html", "text"], | ||
} | ||
|
||
module.exports = customJestConfig |
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" |
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
Oops, something went wrong.