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: update jest to the latest version #193

Merged
merged 4 commits into from Sep 18, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1,612 changes: 766 additions & 846 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Expand Up @@ -63,7 +63,7 @@
},
"dependencies": {
"cssnano": "^5.1.8",
"jest-worker": "^27.5.1",
"jest-worker": "^29.0.3",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is required, otherwise lint job is failing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, okay 👍🏻

"postcss": "^8.4.13",
"schema-utils": "^4.0.0",
"serialize-javascript": "^6.0.0",
Expand All @@ -80,7 +80,7 @@
"@types/csso": "^5.0.0",
"@types/serialize-javascript": "^5.0.2",
"@webpack-contrib/eslint-config-webpack": "^3.0.0",
"babel-jest": "^28.1.0",
"babel-jest": "^29.0.3",
"clean-css": "^5.3.0",
"copy-webpack-plugin": "^9.1.0",
"cross-env": "^7.0.3",
Expand All @@ -94,7 +94,7 @@
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"husky": "^8.0.1",
"jest": "^28.1.0",
"jest": "^29.0.3",
"lightningcss": "^1.14.0",
"lint-staged": "^12.4.1",
"memfs": "^3.4.1",
Expand Down
154 changes: 77 additions & 77 deletions test/__snapshots__/CssMinimizerPlugin.test.js.snap

Large diffs are not rendered by default.

80 changes: 40 additions & 40 deletions test/__snapshots__/cache-option.test.js.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`"cache" option should work with the "false" value for the "cache" option: assets 1`] = `
Object {
{
"five.css": "body{color:red;font-size:20px}a{color:blue}",
"four.css": "h1{color:green}h2{color:#ff0}",
"one.css": "a{text-align:center}",
Expand All @@ -11,7 +11,7 @@ Object {
`;

exports[`"cache" option should work with the "false" value for the "cache" option: assets 2`] = `
Object {
{
"five.css": "body{color:red;font-size:20px}a{color:blue}",
"four.css": "h1{color:green}h2{color:#ff0}",
"one.css": "a{text-align:center}",
Expand All @@ -20,16 +20,16 @@ Object {
}
`;

exports[`"cache" option should work with the "false" value for the "cache" option: errors 1`] = `Array []`;
exports[`"cache" option should work with the "false" value for the "cache" option: errors 1`] = `[]`;

exports[`"cache" option should work with the "false" value for the "cache" option: errors 2`] = `Array []`;
exports[`"cache" option should work with the "false" value for the "cache" option: errors 2`] = `[]`;

exports[`"cache" option should work with the "false" value for the "cache" option: warnings 1`] = `Array []`;
exports[`"cache" option should work with the "false" value for the "cache" option: warnings 1`] = `[]`;

exports[`"cache" option should work with the "false" value for the "cache" option: warnings 2`] = `Array []`;
exports[`"cache" option should work with the "false" value for the "cache" option: warnings 2`] = `[]`;

exports[`"cache" option should work with the "filesystem" value for the "cache.type" option and output warnings: assets 1`] = `
Object {
{
"five.css": "body {
color: red;
}
Expand Down Expand Up @@ -78,7 +78,7 @@ a {
`;

exports[`"cache" option should work with the "filesystem" value for the "cache.type" option and output warnings: assets 2`] = `
Object {
{
"five.css": "body {
color: red;
}
Expand Down Expand Up @@ -126,12 +126,12 @@ a {
}
`;

exports[`"cache" option should work with the "filesystem" value for the "cache.type" option and output warnings: errors 1`] = `Array []`;
exports[`"cache" option should work with the "filesystem" value for the "cache.type" option and output warnings: errors 1`] = `[]`;

exports[`"cache" option should work with the "filesystem" value for the "cache.type" option and output warnings: errors 2`] = `Array []`;
exports[`"cache" option should work with the "filesystem" value for the "cache.type" option and output warnings: errors 2`] = `[]`;

exports[`"cache" option should work with the "filesystem" value for the "cache.type" option and output warnings: warnings 1`] = `
Array [
[
"Warning: five.css from Css Minimizer plugin
[warning-plugin] Warning from five.css",
"Warning: four.css from Css Minimizer plugin
Expand All @@ -146,7 +146,7 @@ Array [
`;

exports[`"cache" option should work with the "filesystem" value for the "cache.type" option and output warnings: warnings 2`] = `
Array [
[
"Warning: five.css from Css Minimizer plugin
[warning-plugin] Warning from five.css",
"Warning: four.css from Css Minimizer plugin
Expand All @@ -161,55 +161,55 @@ Array [
`;

exports[`"cache" option should work with the "filesystem" value for the "cache.type" option and source maps: assets 1`] = `
Object {
{
"five.css": "body{color:red;font-size:20px}a{color:blue}
/*# sourceMappingURL=five.css.map*/",
"five.css.map": "{\\"version\\":3,\\"file\\":\\"five.css\\",\\"mappings\\":\\"AAGA,KACE,SAAU,CACV,cACF,CACA,EACE,UACF\\",\\"sources\\":[\\"webpack:///./test/bar1.css\\"],\\"sourcesContent\\":[\\"body {\\\\n color: red;\\\\n}\\\\nbody {\\\\n color: red;\\\\n font-size: 20px;\\\\n}\\\\na {\\\\n color: blue;\\\\n}\\\\n\\"],\\"names\\":[],\\"sourceRoot\\":\\"\\"}",
"five.css.map": "{"version":3,"file":"five.css","mappings":"AAGA,KACE,SAAU,CACV,cACF,CACA,EACE,UACF","sources":["webpack:///./test/bar1.css"],"sourcesContent":["body {\\n color: red;\\n}\\nbody {\\n color: red;\\n font-size: 20px;\\n}\\na {\\n color: blue;\\n}\\n"],"names":[],"sourceRoot":""}",
"four.css": "h1{color:green}h2{color:#ff0}
/*# sourceMappingURL=four.css.map*/",
"four.css.map": "{\\"version\\":3,\\"file\\":\\"four.css\\",\\"mappings\\":\\"AAAA,GACE,WACF,CACA,GACE,UACF\\",\\"sources\\":[\\"webpack:///./test/bar2.css\\"],\\"sourcesContent\\":[\\"h1 {\\\\n color: green;\\\\n}\\\\nh2 {\\\\n color: yellow;\\\\n}\\\\nh3 {\\\\n}\\\\n\\"],\\"names\\":[],\\"sourceRoot\\":\\"\\"}",
"four.css.map": "{"version":3,"file":"four.css","mappings":"AAAA,GACE,WACF,CACA,GACE,UACF","sources":["webpack:///./test/bar2.css"],"sourcesContent":["h1 {\\n color: green;\\n}\\nh2 {\\n color: yellow;\\n}\\nh3 {\\n}\\n"],"names":[],"sourceRoot":""}",
"one.css": "a{text-align:center}
/*# sourceMappingURL=one.css.map*/",
"one.css.map": "{\\"version\\":3,\\"file\\":\\"one.css\\",\\"mappings\\":\\"AAAA,EACE,iBACF\\",\\"sources\\":[\\"webpack:///./test/foo.css\\"],\\"sourcesContent\\":[\\"a {\\\\n text-align: center;\\\\n}\\\\n\\"],\\"names\\":[],\\"sourceRoot\\":\\"\\"}",
"one.css.map": "{"version":3,"file":"one.css","mappings":"AAAA,EACE,iBACF","sources":["webpack:///./test/foo.css"],"sourcesContent":["a {\\n text-align: center;\\n}\\n"],"names":[],"sourceRoot":""}",
"three.css": "body{color:red;font-size:20px}a{color:blue}
/*# sourceMappingURL=three.css.map*/",
"three.css.map": "{\\"version\\":3,\\"file\\":\\"three.css\\",\\"mappings\\":\\"AAGA,KACE,SAAU,CACV,cACF,CACA,EACE,UACF\\",\\"sources\\":[\\"webpack:///./test/bar1.css\\"],\\"sourcesContent\\":[\\"body {\\\\n color: red;\\\\n}\\\\nbody {\\\\n color: red;\\\\n font-size: 20px;\\\\n}\\\\na {\\\\n color: blue;\\\\n}\\\\n\\"],\\"names\\":[],\\"sourceRoot\\":\\"\\"}",
"three.css.map": "{"version":3,"file":"three.css","mappings":"AAGA,KACE,SAAU,CACV,cACF,CACA,EACE,UACF","sources":["webpack:///./test/bar1.css"],"sourcesContent":["body {\\n color: red;\\n}\\nbody {\\n color: red;\\n font-size: 20px;\\n}\\na {\\n color: blue;\\n}\\n"],"names":[],"sourceRoot":""}",
"two.css": "a{text-align:center}
/*# sourceMappingURL=two.css.map*/",
"two.css.map": "{\\"version\\":3,\\"file\\":\\"two.css\\",\\"mappings\\":\\"AAAA,EACE,iBACF\\",\\"sources\\":[\\"webpack:///./test/foo.css\\"],\\"sourcesContent\\":[\\"a {\\\\n text-align: center;\\\\n}\\\\n\\"],\\"names\\":[],\\"sourceRoot\\":\\"\\"}",
"two.css.map": "{"version":3,"file":"two.css","mappings":"AAAA,EACE,iBACF","sources":["webpack:///./test/foo.css"],"sourcesContent":["a {\\n text-align: center;\\n}\\n"],"names":[],"sourceRoot":""}",
}
`;

exports[`"cache" option should work with the "filesystem" value for the "cache.type" option and source maps: assets 2`] = `
Object {
{
"five.css": "body{color:red;font-size:20px}a{color:blue}
/*# sourceMappingURL=five.css.map*/",
"five.css.map": "{\\"version\\":3,\\"file\\":\\"five.css\\",\\"mappings\\":\\"AAGA,KACE,SAAU,CACV,cACF,CACA,EACE,UACF\\",\\"sources\\":[\\"webpack:///./test/bar1.css\\"],\\"sourcesContent\\":[\\"body {\\\\n color: red;\\\\n}\\\\nbody {\\\\n color: red;\\\\n font-size: 20px;\\\\n}\\\\na {\\\\n color: blue;\\\\n}\\\\n\\"],\\"names\\":[],\\"sourceRoot\\":\\"\\"}",
"five.css.map": "{"version":3,"file":"five.css","mappings":"AAGA,KACE,SAAU,CACV,cACF,CACA,EACE,UACF","sources":["webpack:///./test/bar1.css"],"sourcesContent":["body {\\n color: red;\\n}\\nbody {\\n color: red;\\n font-size: 20px;\\n}\\na {\\n color: blue;\\n}\\n"],"names":[],"sourceRoot":""}",
"four.css": "h1{color:green}h2{color:#ff0}
/*# sourceMappingURL=four.css.map*/",
"four.css.map": "{\\"version\\":3,\\"file\\":\\"four.css\\",\\"mappings\\":\\"AAAA,GACE,WACF,CACA,GACE,UACF\\",\\"sources\\":[\\"webpack:///./test/bar2.css\\"],\\"sourcesContent\\":[\\"h1 {\\\\n color: green;\\\\n}\\\\nh2 {\\\\n color: yellow;\\\\n}\\\\nh3 {\\\\n}\\\\n\\"],\\"names\\":[],\\"sourceRoot\\":\\"\\"}",
"four.css.map": "{"version":3,"file":"four.css","mappings":"AAAA,GACE,WACF,CACA,GACE,UACF","sources":["webpack:///./test/bar2.css"],"sourcesContent":["h1 {\\n color: green;\\n}\\nh2 {\\n color: yellow;\\n}\\nh3 {\\n}\\n"],"names":[],"sourceRoot":""}",
"one.css": "a{text-align:center}
/*# sourceMappingURL=one.css.map*/",
"one.css.map": "{\\"version\\":3,\\"file\\":\\"one.css\\",\\"mappings\\":\\"AAAA,EACE,iBACF\\",\\"sources\\":[\\"webpack:///./test/foo.css\\"],\\"sourcesContent\\":[\\"a {\\\\n text-align: center;\\\\n}\\\\n\\"],\\"names\\":[],\\"sourceRoot\\":\\"\\"}",
"one.css.map": "{"version":3,"file":"one.css","mappings":"AAAA,EACE,iBACF","sources":["webpack:///./test/foo.css"],"sourcesContent":["a {\\n text-align: center;\\n}\\n"],"names":[],"sourceRoot":""}",
"three.css": "body{color:red;font-size:20px}a{color:blue}
/*# sourceMappingURL=three.css.map*/",
"three.css.map": "{\\"version\\":3,\\"file\\":\\"three.css\\",\\"mappings\\":\\"AAGA,KACE,SAAU,CACV,cACF,CACA,EACE,UACF\\",\\"sources\\":[\\"webpack:///./test/bar1.css\\"],\\"sourcesContent\\":[\\"body {\\\\n color: red;\\\\n}\\\\nbody {\\\\n color: red;\\\\n font-size: 20px;\\\\n}\\\\na {\\\\n color: blue;\\\\n}\\\\n\\"],\\"names\\":[],\\"sourceRoot\\":\\"\\"}",
"three.css.map": "{"version":3,"file":"three.css","mappings":"AAGA,KACE,SAAU,CACV,cACF,CACA,EACE,UACF","sources":["webpack:///./test/bar1.css"],"sourcesContent":["body {\\n color: red;\\n}\\nbody {\\n color: red;\\n font-size: 20px;\\n}\\na {\\n color: blue;\\n}\\n"],"names":[],"sourceRoot":""}",
"two.css": "a{text-align:center}
/*# sourceMappingURL=two.css.map*/",
"two.css.map": "{\\"version\\":3,\\"file\\":\\"two.css\\",\\"mappings\\":\\"AAAA,EACE,iBACF\\",\\"sources\\":[\\"webpack:///./test/foo.css\\"],\\"sourcesContent\\":[\\"a {\\\\n text-align: center;\\\\n}\\\\n\\"],\\"names\\":[],\\"sourceRoot\\":\\"\\"}",
"two.css.map": "{"version":3,"file":"two.css","mappings":"AAAA,EACE,iBACF","sources":["webpack:///./test/foo.css"],"sourcesContent":["a {\\n text-align: center;\\n}\\n"],"names":[],"sourceRoot":""}",
}
`;

exports[`"cache" option should work with the "filesystem" value for the "cache.type" option and source maps: errors 1`] = `Array []`;
exports[`"cache" option should work with the "filesystem" value for the "cache.type" option and source maps: errors 1`] = `[]`;

exports[`"cache" option should work with the "filesystem" value for the "cache.type" option and source maps: errors 2`] = `Array []`;
exports[`"cache" option should work with the "filesystem" value for the "cache.type" option and source maps: errors 2`] = `[]`;

exports[`"cache" option should work with the "filesystem" value for the "cache.type" option and source maps: warnings 1`] = `Array []`;
exports[`"cache" option should work with the "filesystem" value for the "cache.type" option and source maps: warnings 1`] = `[]`;

exports[`"cache" option should work with the "filesystem" value for the "cache.type" option and source maps: warnings 2`] = `Array []`;
exports[`"cache" option should work with the "filesystem" value for the "cache.type" option and source maps: warnings 2`] = `[]`;

exports[`"cache" option should work with the "filesystem" value for the "cache.type" option: assets 1`] = `
Object {
{
"five.css": "body{color:red;font-size:20px}a{color:blue}",
"four.css": "h1{color:green}h2{color:#ff0}",
"one.css": "a{text-align:center}",
Expand All @@ -219,7 +219,7 @@ Object {
`;

exports[`"cache" option should work with the "filesystem" value for the "cache.type" option: assets 2`] = `
Object {
{
"five.css": "body{color:red;font-size:20px}a{color:blue}",
"four.css": "h1{color:green}h2{color:#ff0}",
"one.css": "a{text-align:center}",
Expand All @@ -228,16 +228,16 @@ Object {
}
`;

exports[`"cache" option should work with the "filesystem" value for the "cache.type" option: errors 1`] = `Array []`;
exports[`"cache" option should work with the "filesystem" value for the "cache.type" option: errors 1`] = `[]`;

exports[`"cache" option should work with the "filesystem" value for the "cache.type" option: errors 2`] = `Array []`;
exports[`"cache" option should work with the "filesystem" value for the "cache.type" option: errors 2`] = `[]`;

exports[`"cache" option should work with the "filesystem" value for the "cache.type" option: warnings 1`] = `Array []`;
exports[`"cache" option should work with the "filesystem" value for the "cache.type" option: warnings 1`] = `[]`;

exports[`"cache" option should work with the "filesystem" value for the "cache.type" option: warnings 2`] = `Array []`;
exports[`"cache" option should work with the "filesystem" value for the "cache.type" option: warnings 2`] = `[]`;

exports[`"cache" option should work with the "memory" value for the "cache.type" option: assets 1`] = `
Object {
{
"five.css": "body{color:red;font-size:20px}a{color:blue}",
"four.css": "h1{color:green}h2{color:#ff0}",
"one.css": "a{text-align:center}",
Expand All @@ -247,7 +247,7 @@ Object {
`;

exports[`"cache" option should work with the "memory" value for the "cache.type" option: assets 2`] = `
Object {
{
"five.css": "body{color:red;font-size:20px}a{color:blue}",
"four.css": "h1{color:green}h2{color:#ff0}",
"one.css": "a{text-align:center}",
Expand All @@ -256,10 +256,10 @@ Object {
}
`;

exports[`"cache" option should work with the "memory" value for the "cache.type" option: errors 1`] = `Array []`;
exports[`"cache" option should work with the "memory" value for the "cache.type" option: errors 1`] = `[]`;

exports[`"cache" option should work with the "memory" value for the "cache.type" option: errors 2`] = `Array []`;
exports[`"cache" option should work with the "memory" value for the "cache.type" option: errors 2`] = `[]`;

exports[`"cache" option should work with the "memory" value for the "cache.type" option: warnings 1`] = `Array []`;
exports[`"cache" option should work with the "memory" value for the "cache.type" option: warnings 1`] = `[]`;

exports[`"cache" option should work with the "memory" value for the "cache.type" option: warnings 2`] = `Array []`;
exports[`"cache" option should work with the "memory" value for the "cache.type" option: warnings 2`] = `[]`;
24 changes: 12 additions & 12 deletions test/__snapshots__/exclude-option.test.js.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`exclude option should match snapshot for a single RegExp value excluded1: assets 1`] = `
Object {
{
"entry.css": "body{color:red}a{color:blue}",
"excluded1.css": "a {
text-align: center;
Expand All @@ -12,12 +12,12 @@ Object {
}
`;

exports[`exclude option should match snapshot for a single RegExp value excluded1: errors 1`] = `Array []`;
exports[`exclude option should match snapshot for a single RegExp value excluded1: errors 1`] = `[]`;

exports[`exclude option should match snapshot for a single RegExp value excluded1: warnings 1`] = `Array []`;
exports[`exclude option should match snapshot for a single RegExp value excluded1: warnings 1`] = `[]`;

exports[`exclude option should match snapshot for a single String value excluded1: assets 1`] = `
Object {
{
"entry.css": "body{color:red}a{color:blue}",
"excluded1.css": "a {
text-align: center;
Expand All @@ -28,12 +28,12 @@ Object {
}
`;

exports[`exclude option should match snapshot for a single String value excluded1: errors 1`] = `Array []`;
exports[`exclude option should match snapshot for a single String value excluded1: errors 1`] = `[]`;

exports[`exclude option should match snapshot for a single String value excluded1: warnings 1`] = `Array []`;
exports[`exclude option should match snapshot for a single String value excluded1: warnings 1`] = `[]`;

exports[`exclude option should match snapshot for multiple RegExp values excluded1 and excluded2: assets 1`] = `
Object {
{
"entry.css": "body{color:red}a{color:blue}",
"excluded1.css": "a {
text-align: center;
Expand All @@ -55,12 +55,12 @@ a {
}
`;

exports[`exclude option should match snapshot for multiple RegExp values excluded1 and excluded2: errors 1`] = `Array []`;
exports[`exclude option should match snapshot for multiple RegExp values excluded1 and excluded2: errors 1`] = `[]`;

exports[`exclude option should match snapshot for multiple RegExp values excluded1 and excluded2: warnings 1`] = `Array []`;
exports[`exclude option should match snapshot for multiple RegExp values excluded1 and excluded2: warnings 1`] = `[]`;

exports[`exclude option should match snapshot for multiple String values excluded1 and excluded2: assets 1`] = `
Object {
{
"entry.css": "body{color:red}a{color:blue}",
"excluded1.css": "a {
text-align: center;
Expand All @@ -82,6 +82,6 @@ a {
}
`;

exports[`exclude option should match snapshot for multiple String values excluded1 and excluded2: errors 1`] = `Array []`;
exports[`exclude option should match snapshot for multiple String values excluded1 and excluded2: errors 1`] = `[]`;

exports[`exclude option should match snapshot for multiple String values excluded1 and excluded2: warnings 1`] = `Array []`;
exports[`exclude option should match snapshot for multiple String values excluded1 and excluded2: warnings 1`] = `[]`;