This repository has been archived by the owner on May 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[jest-config-terra] Jest 29 upgrade (#863)
- Loading branch information
Showing
25 changed files
with
2,439 additions
and
1,769 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
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
13 changes: 3 additions & 10 deletions
13
packages/jest-config-terra/tests/jest/JestEnvironmentJsdomTerra.test.js
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,16 +1,9 @@ | ||
const JestEnvironmentJsdomTerra = require('../../src/JestEnvironmentJsdomTerra'); | ||
|
||
describe('jest environment jsdom terra', () => { | ||
it('sets up the environment appropriately', () => { | ||
const testConfig = { | ||
globals: {}, | ||
testEnvironmentOptions: {}, | ||
}; | ||
expect(window.matchMedia()).toEqual({ matches: true }); | ||
expect(window.HTMLElement.prototype.scrollIntoView).toBeDefined(); | ||
|
||
const environment = new JestEnvironmentJsdomTerra(testConfig, {}); | ||
expect(environment.dom.window.matchMedia).toBeDefined(); | ||
expect(environment.dom.window.HTMLElement.prototype.scrollIntoView).toBeDefined(); | ||
const htmlTag = environment.dom.window.document.getElementsByTagName('html')[0]; | ||
const htmlTag = window.document.getElementsByTagName('html')[0]; | ||
expect(htmlTag.getAttribute('dir')).toEqual('ltr'); | ||
}); | ||
}); |
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
2 changes: 1 addition & 1 deletion
2
packages/package-json-lint/tests/jest/project-structure/__snapshots__/index.test.js.snap
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
26 changes: 13 additions & 13 deletions
26
.../jest/rules/__snapshots__/require-dependencies-declared-at-appropriate-level.test.js.snap
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,48 +1,48 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`require-dependencies-declared-at-appropriate-level when projectType is application fails as a warning when there unnecessary dependencies/peerDependencies 1`] = ` | ||
Array [ | ||
Object { | ||
[ | ||
{ | ||
"lintId": "require-dependencies-declared-at-appropriate-level", | ||
"lintMessage": "This project has unnecessary dependencies that violates the require-dependencies-declared-at-appropriate-level rule: | ||
@cerner/webpack-config-terra@^2.0.0 does not satisfy requirement for require-dependencies-declared-at-appropriate-level rule.", | ||
"projectType": "application", | ||
"severity": Object { | ||
"severity": { | ||
"severityType": "warn", | ||
}, | ||
}, | ||
Object { | ||
{ | ||
"lintId": "require-dependencies-declared-at-appropriate-level", | ||
"lintMessage": "This project has unnecessary peerDependencies that violates the require-dependencies-declared-at-appropriate-level rule: | ||
jest@^26.6.2 does not satisfy requirement for require-dependencies-declared-at-appropriate-level rule.", | ||
"projectType": "application", | ||
"severity": Object { | ||
"severity": { | ||
"severityType": "warn", | ||
}, | ||
}, | ||
] | ||
`; | ||
|
||
exports[`require-dependencies-declared-at-appropriate-level when projectType is application succeeds when there are no unnecessary dependencies/peerDependencies 1`] = `Array []`; | ||
exports[`require-dependencies-declared-at-appropriate-level when projectType is application succeeds when there are no unnecessary dependencies/peerDependencies 1`] = `[]`; | ||
|
||
exports[`require-dependencies-declared-at-appropriate-level when projectType is application succeeds when unnecessary dependencies/peerDependencies are passed in the allowList 1`] = `Array []`; | ||
exports[`require-dependencies-declared-at-appropriate-level when projectType is application succeeds when unnecessary dependencies/peerDependencies are passed in the allowList 1`] = `[]`; | ||
|
||
exports[`require-dependencies-declared-at-appropriate-level when projectType is devModule succeeds when there no unnecessary dependencies/peerDependencies 1`] = `Array []`; | ||
exports[`require-dependencies-declared-at-appropriate-level when projectType is devModule succeeds when there no unnecessary dependencies/peerDependencies 1`] = `[]`; | ||
|
||
exports[`require-dependencies-declared-at-appropriate-level when projectType is devModule succeeds when there unnecessary dependencies/peerDependencies 1`] = `Array []`; | ||
exports[`require-dependencies-declared-at-appropriate-level when projectType is devModule succeeds when there unnecessary dependencies/peerDependencies 1`] = `[]`; | ||
|
||
exports[`require-dependencies-declared-at-appropriate-level when projectType is module fails as a warning when there unnecessary dependencies/peerDependencies 1`] = ` | ||
Array [ | ||
Object { | ||
[ | ||
{ | ||
"lintId": "require-dependencies-declared-at-appropriate-level", | ||
"lintMessage": "This project has unnecessary peerDependencies that violates the require-dependencies-declared-at-appropriate-level rule: | ||
jest@^26.6.2 does not satisfy requirement for require-dependencies-declared-at-appropriate-level rule.", | ||
"projectType": "module", | ||
"severity": Object { | ||
"severity": { | ||
"severityType": "warn", | ||
}, | ||
}, | ||
] | ||
`; | ||
|
||
exports[`require-dependencies-declared-at-appropriate-level when projectType is module succeeds when there are no unnecessary dependencies/peerDependencies 1`] = `Array []`; | ||
exports[`require-dependencies-declared-at-appropriate-level when projectType is module succeeds when there are no unnecessary dependencies/peerDependencies 1`] = `[]`; |
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 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.