Skip to content

Commit

Permalink
chore(deps): bump jest to ^28.0.0 (major) (#833)
Browse files Browse the repository at this point in the history
* chore(deps): bump jest to ^28.0.0

* Fix breaking changes and deprecations

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: eps1lon <[email protected]>
  • Loading branch information
3 people authored May 2, 2022
1 parent d8597d4 commit ed14e80
Show file tree
Hide file tree
Showing 6 changed files with 513 additions and 589 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@
"cypress": "^9.0.0",
"eslint": "^7.27.0",
"eslint-plugin-jest": "^26.0.0",
"jest": "^27.0.3",
"jest-diff": "^27.0.2",
"jest-environment-jsdom": "^27.0.3",
"jest": "^28.0.0",
"jest-diff": "^28.0.0",
"jest-environment-jsdom": "^28.0.0",
"jest-junit": "^13.0.0",
"js-yaml": "^4.1.0",
"jsdom": "^19.0.0",
Expand Down
2 changes: 1 addition & 1 deletion scripts/jest/jest-environment-jsdom-mock-edge14.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const JestEnvironmentJsdom = require("jest-environment-jsdom");
const JestEnvironmentJsdom = require("jest-environment-jsdom").default;

class JestEnvironmentJsdomMockEdge16 extends JestEnvironmentJsdom {
setup() {
Expand Down
2 changes: 1 addition & 1 deletion scripts/jest/jest-environment-jsdom-mock-ie11.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const JestEnvironmentJsdom = require("jest-environment-jsdom");
const JestEnvironmentJsdom = require("jest-environment-jsdom").default;

class JestEnvironmentJsdomMockIE11 extends JestEnvironmentJsdom {
setup() {
Expand Down
4 changes: 3 additions & 1 deletion scripts/jest/jest.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ module.exports = {
rootDir: path.resolve(__dirname, "../../sources"),
setupFilesAfterEnv: [require.resolve("./jest.setup")],
testEnvironment: "jsdom",
testEnvironmentOptions: {
url: "http://localhost",
},
testPathIgnorePatterns: [
"/node_modules/",
"/fixtures/",
"/__tests__/helpers/",
"__mocks__",
],
testURL: "http://localhost",
};
8 changes: 4 additions & 4 deletions sources/__tests__/accessible-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,11 +567,11 @@ describe("options.computedStyleSupportsPseudoElements", () => {

// one for ::before, one for ::after
expect(console.error).toHaveBeenCalledTimes(2);
expect(console.error.mock.calls[0][0]).toMatch(
"Error: Not implemented: window.computedStyle(elt, pseudoElt)"
expect(console.error.mock.calls[0][0]).toMatchInlineSnapshot(
`[Error: Not implemented: window.computedStyle(elt, pseudoElt)]`
);
expect(console.error.mock.calls[1][0]).toMatch(
"Error: Not implemented: window.computedStyle(elt, pseudoElt)"
expect(console.error.mock.calls[1][0]).toMatchInlineSnapshot(
`[Error: Not implemented: window.computedStyle(elt, pseudoElt)]`
);
});
});
Expand Down
Loading

0 comments on commit ed14e80

Please sign in to comment.