tests(cli): update snapshot
This commit is contained in:
parent
a3a78fb0c0
commit
0737f3cfe2
334
test/Cli.test.js
334
test/Cli.test.js
|
@ -124,15 +124,15 @@ describe("Cli", () => {
|
|||
{},
|
||||
e =>
|
||||
e.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"stats": Object {
|
||||
"warningsFilter": Array [
|
||||
/module/,
|
||||
"path",
|
||||
],
|
||||
},
|
||||
}
|
||||
`)
|
||||
Object {
|
||||
"stats": Object {
|
||||
"warningsFilter": Array [
|
||||
/module/,
|
||||
"path",
|
||||
],
|
||||
},
|
||||
}
|
||||
`)
|
||||
);
|
||||
|
||||
test(
|
||||
|
@ -144,21 +144,21 @@ Object {
|
|||
{},
|
||||
e =>
|
||||
e.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"module": Object {
|
||||
"rules": Array [
|
||||
Object {
|
||||
"test": /\\\\\\.css\\$/,
|
||||
"use": "css-loader",
|
||||
},
|
||||
Object {
|
||||
"test": /\\\\\\.js\\$/,
|
||||
"use": "babel-loader",
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
`)
|
||||
Object {
|
||||
"module": Object {
|
||||
"rules": Array [
|
||||
Object {
|
||||
"test": /\\\\\\.css\\$/,
|
||||
"use": "css-loader",
|
||||
},
|
||||
Object {
|
||||
"test": /\\\\\\.js\\$/,
|
||||
"use": "babel-loader",
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
`)
|
||||
);
|
||||
|
||||
test(
|
||||
|
@ -183,26 +183,26 @@ Object {
|
|||
},
|
||||
e =>
|
||||
e.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"module": Object {
|
||||
"rules": Array [
|
||||
Object {
|
||||
"test": /\\\\\\.css\\$/,
|
||||
"use": "css-loader",
|
||||
},
|
||||
Object {
|
||||
"test": /\\\\\\.js\\$/,
|
||||
"use": "babel-loader",
|
||||
},
|
||||
],
|
||||
},
|
||||
"stats": Object {
|
||||
"warningsFilter": Array [
|
||||
"path",
|
||||
],
|
||||
},
|
||||
}
|
||||
`)
|
||||
Object {
|
||||
"module": Object {
|
||||
"rules": Array [
|
||||
Object {
|
||||
"test": /\\\\\\.css\\$/,
|
||||
"use": "css-loader",
|
||||
},
|
||||
Object {
|
||||
"test": /\\\\\\.js\\$/,
|
||||
"use": "babel-loader",
|
||||
},
|
||||
],
|
||||
},
|
||||
"stats": Object {
|
||||
"warningsFilter": Array [
|
||||
"path",
|
||||
],
|
||||
},
|
||||
}
|
||||
`)
|
||||
);
|
||||
|
||||
test(
|
||||
|
@ -214,15 +214,15 @@ Object {
|
|||
{},
|
||||
e =>
|
||||
e.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"output": Object {
|
||||
"ecmaVersion": "2015",
|
||||
},
|
||||
"watchOptions": Object {
|
||||
"aggregateTimeout": 100,
|
||||
},
|
||||
}
|
||||
`)
|
||||
Object {
|
||||
"output": Object {
|
||||
"ecmaVersion": 2015,
|
||||
},
|
||||
"watchOptions": Object {
|
||||
"aggregateTimeout": 100,
|
||||
},
|
||||
}
|
||||
`)
|
||||
);
|
||||
|
||||
test(
|
||||
|
@ -239,27 +239,27 @@ Object {
|
|||
{},
|
||||
e =>
|
||||
e.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"amd": false,
|
||||
"optimization": Object {
|
||||
"usedExports": true,
|
||||
},
|
||||
"output": Object {
|
||||
"compareBeforeEmit": false,
|
||||
"iife": true,
|
||||
"library": Object {
|
||||
"name": Array [
|
||||
"hello",
|
||||
"world",
|
||||
],
|
||||
"umdNamedDefine": false,
|
||||
},
|
||||
},
|
||||
"stats": Object {
|
||||
"logging": "verbose",
|
||||
},
|
||||
}
|
||||
`)
|
||||
Object {
|
||||
"amd": false,
|
||||
"optimization": Object {
|
||||
"usedExports": true,
|
||||
},
|
||||
"output": Object {
|
||||
"compareBeforeEmit": false,
|
||||
"iife": true,
|
||||
"library": Object {
|
||||
"name": Array [
|
||||
"hello",
|
||||
"world",
|
||||
],
|
||||
"umdNamedDefine": false,
|
||||
},
|
||||
},
|
||||
"stats": Object {
|
||||
"logging": "verbose",
|
||||
},
|
||||
}
|
||||
`)
|
||||
);
|
||||
|
||||
test(
|
||||
|
@ -281,98 +281,98 @@ Object {
|
|||
},
|
||||
e =>
|
||||
e.toMatchInlineSnapshot(`
|
||||
Array [
|
||||
Object {
|
||||
"argument": "output-library-name",
|
||||
"index": undefined,
|
||||
"path": "output",
|
||||
"type": "unexpected-non-object-in-path",
|
||||
"value": "non-object",
|
||||
},
|
||||
Object {
|
||||
"argument": "resolve-loader-unsafe-cache",
|
||||
"index": 0,
|
||||
"path": "resolveLoader.unsafeCache",
|
||||
"type": "multiple-values-unexpected",
|
||||
"value": true,
|
||||
},
|
||||
Object {
|
||||
"argument": "resolve-loader-unsafe-cache",
|
||||
"index": 1,
|
||||
"path": "resolveLoader.unsafeCache",
|
||||
"type": "multiple-values-unexpected",
|
||||
"value": false,
|
||||
},
|
||||
Object {
|
||||
"argument": "output-ecma-version",
|
||||
"expected": "2009",
|
||||
"index": undefined,
|
||||
"path": "output.ecmaVersion",
|
||||
"type": "invalid-value",
|
||||
"value": "2015x",
|
||||
},
|
||||
Object {
|
||||
"argument": "output-ecma-version",
|
||||
"expected": "number",
|
||||
"index": undefined,
|
||||
"path": "output.ecmaVersion",
|
||||
"type": "invalid-value",
|
||||
"value": "2015x",
|
||||
},
|
||||
Object {
|
||||
"argument": "cache-type",
|
||||
"expected": "memory",
|
||||
"index": undefined,
|
||||
"path": "cache.type",
|
||||
"type": "invalid-value",
|
||||
"value": "filsystem",
|
||||
},
|
||||
Object {
|
||||
"argument": "cache-type",
|
||||
"expected": "filesystem",
|
||||
"index": undefined,
|
||||
"path": "cache.type",
|
||||
"type": "invalid-value",
|
||||
"value": "filsystem",
|
||||
},
|
||||
Object {
|
||||
"argument": "entry-reset",
|
||||
"expected": "true (will reset the previous value to an empty array)",
|
||||
"index": undefined,
|
||||
"path": "entry",
|
||||
"type": "invalid-value",
|
||||
"value": false,
|
||||
},
|
||||
Object {
|
||||
"argument": "module-unknown-context-reg-exp",
|
||||
"expected": "regular expression (example: /ab?c*/)",
|
||||
"index": undefined,
|
||||
"path": "module.unknownContextRegExp",
|
||||
"type": "invalid-value",
|
||||
"value": "ab?c*",
|
||||
},
|
||||
Object {
|
||||
"argument": "module-unknown-context-reg-exp",
|
||||
"expected": "true | false",
|
||||
"index": undefined,
|
||||
"path": "module.unknownContextRegExp",
|
||||
"type": "invalid-value",
|
||||
"value": "ab?c*",
|
||||
},
|
||||
Object {
|
||||
"argument": "module-wrapped-context-reg-exp",
|
||||
"expected": "regular expression (example: /ab?c*/)",
|
||||
"index": undefined,
|
||||
"path": "module.wrappedContextRegExp",
|
||||
"type": "invalid-value",
|
||||
"value": 123,
|
||||
},
|
||||
Object {
|
||||
"argument": "my-argument",
|
||||
"path": "",
|
||||
"type": "unknown-argument",
|
||||
},
|
||||
]
|
||||
`)
|
||||
Array [
|
||||
Object {
|
||||
"argument": "output-library-name",
|
||||
"index": undefined,
|
||||
"path": "output",
|
||||
"type": "unexpected-non-object-in-path",
|
||||
"value": "non-object",
|
||||
},
|
||||
Object {
|
||||
"argument": "resolve-loader-unsafe-cache",
|
||||
"index": 0,
|
||||
"path": "resolveLoader.unsafeCache",
|
||||
"type": "multiple-values-unexpected",
|
||||
"value": true,
|
||||
},
|
||||
Object {
|
||||
"argument": "resolve-loader-unsafe-cache",
|
||||
"index": 1,
|
||||
"path": "resolveLoader.unsafeCache",
|
||||
"type": "multiple-values-unexpected",
|
||||
"value": false,
|
||||
},
|
||||
Object {
|
||||
"argument": "output-ecma-version",
|
||||
"expected": "2009",
|
||||
"index": undefined,
|
||||
"path": "output.ecmaVersion",
|
||||
"type": "invalid-value",
|
||||
"value": "2015x",
|
||||
},
|
||||
Object {
|
||||
"argument": "output-ecma-version",
|
||||
"expected": "number",
|
||||
"index": undefined,
|
||||
"path": "output.ecmaVersion",
|
||||
"type": "invalid-value",
|
||||
"value": "2015x",
|
||||
},
|
||||
Object {
|
||||
"argument": "cache-type",
|
||||
"expected": "memory",
|
||||
"index": undefined,
|
||||
"path": "cache.type",
|
||||
"type": "invalid-value",
|
||||
"value": "filsystem",
|
||||
},
|
||||
Object {
|
||||
"argument": "cache-type",
|
||||
"expected": "filesystem",
|
||||
"index": undefined,
|
||||
"path": "cache.type",
|
||||
"type": "invalid-value",
|
||||
"value": "filsystem",
|
||||
},
|
||||
Object {
|
||||
"argument": "entry-reset",
|
||||
"expected": "true (will reset the previous value to an empty array)",
|
||||
"index": undefined,
|
||||
"path": "entry",
|
||||
"type": "invalid-value",
|
||||
"value": false,
|
||||
},
|
||||
Object {
|
||||
"argument": "module-unknown-context-reg-exp",
|
||||
"expected": "regular expression (example: /ab?c*/)",
|
||||
"index": undefined,
|
||||
"path": "module.unknownContextRegExp",
|
||||
"type": "invalid-value",
|
||||
"value": "ab?c*",
|
||||
},
|
||||
Object {
|
||||
"argument": "module-unknown-context-reg-exp",
|
||||
"expected": "true | false",
|
||||
"index": undefined,
|
||||
"path": "module.unknownContextRegExp",
|
||||
"type": "invalid-value",
|
||||
"value": "ab?c*",
|
||||
},
|
||||
Object {
|
||||
"argument": "module-wrapped-context-reg-exp",
|
||||
"expected": "regular expression (example: /ab?c*/)",
|
||||
"index": undefined,
|
||||
"path": "module.wrappedContextRegExp",
|
||||
"type": "invalid-value",
|
||||
"value": 123,
|
||||
},
|
||||
Object {
|
||||
"argument": "my-argument",
|
||||
"path": "",
|
||||
"type": "unknown-argument",
|
||||
},
|
||||
]
|
||||
`)
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue