mirror of https://github.com/webpack/webpack.git
add test case for holey array
This commit is contained in:
parent
0109d687a6
commit
226e8ce8fd
|
@ -404,6 +404,25 @@ describe("Validation", () => {
|
||||||
- configuration.mode should be one of these:
|
- configuration.mode should be one of these:
|
||||||
\\"development\\" | \\"production\\" | \\"none\\"
|
\\"development\\" | \\"production\\" | \\"none\\"
|
||||||
-> Enable production optimizations or development hints."
|
-> Enable production optimizations or development hints."
|
||||||
|
`)
|
||||||
|
);
|
||||||
|
|
||||||
|
createTestCase(
|
||||||
|
"holey array",
|
||||||
|
// eslint-disable-next-line no-sparse-arrays
|
||||||
|
[
|
||||||
|
{
|
||||||
|
mode: "production"
|
||||||
|
},
|
||||||
|
,
|
||||||
|
{
|
||||||
|
mode: "development"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
msg =>
|
||||||
|
expect(msg).toMatchInlineSnapshot(`
|
||||||
|
"Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
|
||||||
|
- configuration should be an object."
|
||||||
`)
|
`)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue