-
-
Notifications
You must be signed in to change notification settings - Fork 636
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using ts-jest for tests to simplify config and adding sourcemap gener…
…ation to fix debugging (#1620)
- Loading branch information
Showing
8 changed files
with
227 additions
and
87 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,6 @@ | ||
{ | ||
"plugins": [ | ||
"inferno", | ||
"@babel/plugin-transform-modules-commonjs" | ||
] | ||
} |
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,34 +1,13 @@ | ||
import defaultSettings from "./jest.config.js"; | ||
|
||
export default { | ||
collectCoverageFrom: [ | ||
"packages/*/src/**/*.ts", | ||
"!**/*.ts.js", | ||
"!**/inferno-utils/**/*", | ||
"!**/inferno-router/**/utils.ts", | ||
], | ||
coverageDirectory: "coverage", | ||
coverageReporters: ["html", "lcov", "text"], | ||
globals: { | ||
usingJSDOM: true, | ||
usingJest: true | ||
}, | ||
moduleFileExtensions: ["ts", "tsx", "js", "jsx"], | ||
moduleNameMapper: { | ||
"^inferno-router/utils": "<rootDir>/packages/inferno-router/src/utils.ts", | ||
"^inferno(.*?)$": "<rootDir>/packages/inferno$1/src/index.ts", | ||
"mobx": "<rootDir>/node_modules/mobx/dist/mobx.cjs.development.js" | ||
}, | ||
...defaultSettings, | ||
setupFiles: [], | ||
testMatch: [ | ||
"<rootDir>/packages/*/__tests__/**/*spec.server-nodom.@(js|ts)?(x)" | ||
], | ||
testPathIgnorePatterns: [ | ||
"<rootDir>/packages/inferno/__tests__/transition.spec.jsx", | ||
], | ||
transform: { | ||
"^.+\\.jsx?$": "<rootDir>/jest.babel.transform.js", | ||
"^.+\\.tsx?$": "<rootDir>/jest.ts.transform.js" | ||
}, | ||
testEnvironment: "node", | ||
testRunner: "jest-jasmine2", | ||
reporters: [["jest-silent-reporter", { "useDots": 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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.