add test case for holey array

This commit is contained in:
Tobias Koppers 2019-06-19 18:55:27 +02:00
parent 0109d687a6
commit 226e8ce8fd
1 changed files with 19 additions and 0 deletions

View File

@ -404,6 +404,25 @@ describe("Validation", () => {
- configuration.mode should be one of these:
\\"development\\" | \\"production\\" | \\"none\\"
-> 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."
`)
);
});