From 226e8ce8fd9fee33e8d8b37dd4d7d9c24483b4f9 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Wed, 19 Jun 2019 18:55:27 +0200 Subject: [PATCH] add test case for holey array --- test/Validation.test.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/Validation.test.js b/test/Validation.test.js index e82f8de54fa..694dcd39b33 100644 --- a/test/Validation.test.js +++ b/test/Validation.test.js @@ -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." `) ); });