Skip to content

Commit

Permalink
add test case for holey array
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Jun 19, 2019
1 parent 0109d68 commit 226e8ce
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/Validation.test.js
Expand Up @@ -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."
`)
);
});

0 comments on commit 226e8ce

Please sign in to comment.