Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(jest): update dependencies, update config #7872

Merged
merged 6 commits into from
Sep 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/docs/unit-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ and which some components need.
You need to set `testURL` to a valid URL, because some DOM APIs such as
`localStorage` are unhappy with the default (`about:blank`).

> Note: if you're using Jest 23.5.0 or later, `testURL` will default to `http://localhost` so you can skip this setting.

There's one more global that you need to set, but as it's a function you can't
set it here in the JSON. The `setupFiles` array lets you list files that will be
included before all tests are run, so it's perfect for this.
Expand Down
3 changes: 0 additions & 3 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,4 @@ module.exports = {
moduleNameMapper: {
"^highlight.js$": `<rootDir>/node_modules/highlight.js/lib/index.js`,
},
// TODO: Remove this once https://github.com/facebook/jest/pull/6792 is released.
// Probably in Jest 23.4.3
testURL: `http://localhost`,
}
3 changes: 0 additions & 3 deletions jest.integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,4 @@ module.exports = {
],
transform: { "^.+\\.js$": `<rootDir>/jest-transformer.js` },
verbose: true,
// TODO: Remove this once https://github.com/facebook/jest/pull/6792 is released.
// Probably in Jest 23.4.3
testURL: `http://localhost`,
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"flow-bin": "^0.42.0",
"fs-extra": "^7.0.0",
"glob": "^7.1.1",
"jest": "^22.4.3",
"jest-cli": "^22.4.3",
"jest": "^23.5.0",
"jest-cli": "^23.5.0",
"lerna": "^3.3.0",
"npm-run-all": "4.1.2",
"plop": "^1.8.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ exports[`Adds canonical link to head correctly creates a canonical link if siteU
],
],
],
"results": Array [
Object {
"isThrow": false,
"value": undefined,
},
],
}
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ exports[`gatsby-plugin-less Stage: build-html / Less options #1 1`] = `
},
],
],
"results": Array [
Object {
"isThrow": false,
"value": undefined,
},
],
}
`;

Expand Down Expand Up @@ -105,6 +111,12 @@ exports[`gatsby-plugin-less Stage: build-html / Less options #2 1`] = `
},
],
],
"results": Array [
Object {
"isThrow": false,
"value": undefined,
},
],
}
`;

Expand Down Expand Up @@ -152,6 +164,12 @@ exports[`gatsby-plugin-less Stage: build-html / No options 1`] = `
},
],
],
"results": Array [
Object {
"isThrow": false,
"value": undefined,
},
],
}
`;

Expand Down Expand Up @@ -199,6 +217,12 @@ exports[`gatsby-plugin-less Stage: build-html / PostCss plugins 1`] = `
},
],
],
"results": Array [
Object {
"isThrow": false,
"value": undefined,
},
],
}
`;

Expand Down Expand Up @@ -254,6 +278,12 @@ exports[`gatsby-plugin-less Stage: build-javascript / Less options #1 1`] = `
},
],
],
"results": Array [
Object {
"isThrow": false,
"value": undefined,
},
],
}
`;

Expand Down Expand Up @@ -307,6 +337,12 @@ exports[`gatsby-plugin-less Stage: build-javascript / Less options #2 1`] = `
},
],
],
"results": Array [
Object {
"isThrow": false,
"value": undefined,
},
],
}
`;

Expand Down Expand Up @@ -354,6 +390,12 @@ exports[`gatsby-plugin-less Stage: build-javascript / No options 1`] = `
},
],
],
"results": Array [
Object {
"isThrow": false,
"value": undefined,
},
],
}
`;

Expand Down Expand Up @@ -401,6 +443,12 @@ exports[`gatsby-plugin-less Stage: build-javascript / PostCss plugins 1`] = `
},
],
],
"results": Array [
Object {
"isThrow": false,
"value": undefined,
},
],
}
`;

Expand Down Expand Up @@ -456,6 +504,12 @@ exports[`gatsby-plugin-less Stage: develop / Less options #1 1`] = `
},
],
],
"results": Array [
Object {
"isThrow": false,
"value": undefined,
},
],
}
`;

Expand Down Expand Up @@ -509,6 +563,12 @@ exports[`gatsby-plugin-less Stage: develop / Less options #2 1`] = `
},
],
],
"results": Array [
Object {
"isThrow": false,
"value": undefined,
},
],
}
`;

Expand Down Expand Up @@ -556,6 +616,12 @@ exports[`gatsby-plugin-less Stage: develop / No options 1`] = `
},
],
],
"results": Array [
Object {
"isThrow": false,
"value": undefined,
},
],
}
`;

Expand Down Expand Up @@ -603,6 +669,12 @@ exports[`gatsby-plugin-less Stage: develop / PostCss plugins 1`] = `
},
],
],
"results": Array [
Object {
"isThrow": false,
"value": undefined,
},
],
}
`;

Expand Down Expand Up @@ -658,6 +730,12 @@ exports[`gatsby-plugin-less Stage: develop-html / Less options #1 1`] = `
},
],
],
"results": Array [
Object {
"isThrow": false,
"value": undefined,
},
],
}
`;

Expand Down Expand Up @@ -711,6 +789,12 @@ exports[`gatsby-plugin-less Stage: develop-html / Less options #2 1`] = `
},
],
],
"results": Array [
Object {
"isThrow": false,
"value": undefined,
},
],
}
`;

Expand Down Expand Up @@ -758,6 +842,12 @@ exports[`gatsby-plugin-less Stage: develop-html / No options 1`] = `
},
],
],
"results": Array [
Object {
"isThrow": false,
"value": undefined,
},
],
}
`;

Expand Down Expand Up @@ -805,5 +895,11 @@ exports[`gatsby-plugin-less Stage: develop-html / PostCss plugins 1`] = `
},
],
],
"results": Array [
Object {
"isThrow": false,
"value": undefined,
},
],
}
`;
Loading