-
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 #482 from foretagsplatsen/32129139/Try_jest_jsdom_…
…majestic_instead_of_jasmine_in_widgetjs 32129139: Use jest+jsdom+majestic instead of jasmine in widgetjs
- Loading branch information
Showing
21 changed files
with
2,464 additions
and
772 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* eslint-env node */ | ||
|
||
module.exports = { | ||
overrides: [ | ||
{ | ||
env: { | ||
test: { plugins: ["@babel/plugin-transform-modules-commonjs"] }, | ||
}, | ||
}, | ||
], | ||
}; |
This file was deleted.
Oops, something went wrong.
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,29 @@ | ||
/** | ||
* For a detailed explanation regarding each configuration property, visit: | ||
* https://jestjs.io/docs/configuration | ||
*/ | ||
|
||
/** @type {import('jest').Config} */ | ||
const config = { | ||
restoreMocks: true, | ||
|
||
testRegex: ["./src/test/.*Test.js"], | ||
|
||
setupFilesAfterEnv: ["./src/test/setup.js"], | ||
|
||
// Use "jsdom" instead of "node" to have a "window" object in the | ||
// global environment: | ||
testEnvironment: "jsdom", | ||
|
||
collectCoverage: true, | ||
collectCoverageFrom: ["./src/**", "!./src/test/**", "!./src/widgetjs.js"], | ||
coverageDirectory: "coverage", | ||
|
||
// Files from node_modules/ are normally not transformed but we | ||
// need to convert some of them anyway as they only provide ES | ||
// modules which is not compatible with Jest | ||
// https://jestjs.io/docs/ecmascript-modules: | ||
transformIgnorePatterns: ["/node_modules/(?!(klassified|yaem))"], | ||
}; | ||
|
||
export default config; |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.