From 2ed5a3bb32c47532e33d3227acf3682259851fd0 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Wed, 8 Sep 2021 11:40:12 +0530 Subject: [PATCH 01/23] fix: absent config test --- test/build/config/absent/config-absent.test.js | 4 ++-- test/build/config/absent/webpack.config-absent.js | 9 --------- 2 files changed, 2 insertions(+), 11 deletions(-) delete mode 100644 test/build/config/absent/webpack.config-absent.js diff --git a/test/build/config/absent/config-absent.test.js b/test/build/config/absent/config-absent.test.js index d79d5f7ddfe..11887430263 100644 --- a/test/build/config/absent/config-absent.test.js +++ b/test/build/config/absent/config-absent.test.js @@ -3,8 +3,8 @@ const path = require("path"); const { run } = require("../../../utils/test-utils"); -describe("Config:", () => { - it("supplied config file is absent", async () => { +describe("config flag with non existent file", () => { + it("should throw error with non-existent configuration file", async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ "-c", path.resolve(__dirname, "webpack.config.js"), diff --git a/test/build/config/absent/webpack.config-absent.js b/test/build/config/absent/webpack.config-absent.js deleted file mode 100644 index 9043cafbd4b..00000000000 --- a/test/build/config/absent/webpack.config-absent.js +++ /dev/null @@ -1,9 +0,0 @@ -const { resolve } = require("path"); - -module.exports = { - entry: "./a.js", - output: { - path: resolve(__dirname, "binary"), - filename: "a.bundle.js", - }, -}; From a3189d3db9f969d207281ef08a582613fd4bac42 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Wed, 8 Sep 2021 12:58:06 +0530 Subject: [PATCH 02/23] chore: basic config description --- test/build/config/basic/basic-config.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/build/config/basic/basic-config.test.js b/test/build/config/basic/basic-config.test.js index 180041bdce4..0b294f2466d 100644 --- a/test/build/config/basic/basic-config.test.js +++ b/test/build/config/basic/basic-config.test.js @@ -4,7 +4,7 @@ const { resolve } = require("path"); const { run } = require("../../../utils/test-utils"); describe("basic config file", () => { - it("is able to understand and parse a very basic configuration file", async () => { + it("should build and not throw error with a basic configuration file", async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ "-c", resolve(__dirname, "webpack.config.js"), From 3c8f86d9926d6e9991bbf799637470ff3ad2219a Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Thu, 9 Sep 2021 12:59:41 +0530 Subject: [PATCH 03/23] chore: update default js config test --- .../config/defaults/basic-config/default-js-config.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/build/config/defaults/basic-config/default-js-config.test.js b/test/build/config/defaults/basic-config/default-js-config.test.js index 012e50e97a4..6450af39762 100644 --- a/test/build/config/defaults/basic-config/default-js-config.test.js +++ b/test/build/config/defaults/basic-config/default-js-config.test.js @@ -2,8 +2,8 @@ const fs = require("fs"); const path = require("path"); const { run, isWebpack5 } = require("../../../../utils/test-utils"); -describe("Zero Config", () => { - it("runs when config is present but not supplied via flag", async () => { +describe("default config", () => { + it("should build and not throw error when config is present but not supplied via flag", async () => { const { exitCode, stderr, stdout } = await run(__dirname, []); expect(exitCode).toEqual(0); From 17e74a93f425d6ce811c10afa5c3c556780fa942 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Thu, 9 Sep 2021 13:20:36 +0530 Subject: [PATCH 04/23] chore: update dot webpack config test --- .../{dev-none-config.test.js => dot-webpack-config.test.js} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename test/build/config/defaults/dot-webpack-directory/{dev-none-config.test.js => dot-webpack-config.test.js} (74%) diff --git a/test/build/config/defaults/dot-webpack-directory/dev-none-config.test.js b/test/build/config/defaults/dot-webpack-directory/dot-webpack-config.test.js similarity index 74% rename from test/build/config/defaults/dot-webpack-directory/dev-none-config.test.js rename to test/build/config/defaults/dot-webpack-directory/dot-webpack-config.test.js index 466ba729d2e..0b210a6d268 100644 --- a/test/build/config/defaults/dot-webpack-directory/dev-none-config.test.js +++ b/test/build/config/defaults/dot-webpack-directory/dot-webpack-config.test.js @@ -3,8 +3,8 @@ const { existsSync } = require("fs"); const { resolve } = require("path"); const { run } = require("../../../../utils/test-utils"); -describe("multiple config files", () => { - it("Uses dev config when both dev and none are present", async () => { +describe(".webpack configuration file", () => { + it("should build and not throw error when config is present in .webpack", async () => { const { stdout, stderr, exitCode } = await run(__dirname, []); expect(exitCode).toEqual(0); expect(stderr).toBeFalsy(); From e7cb555425638ecbd1cc1795e6f03c5cbffc05d5 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Mon, 13 Sep 2021 11:32:39 +0530 Subject: [PATCH 05/23] chore: update dot webpack webpackfile test --- ...ocation-config.test.js => dot-webpack-webpackfile.test.js} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename test/build/config/defaults/dot-webpack-directory-webpackfile/{multiple-location-config.test.js => dot-webpack-webpackfile.test.js} (76%) diff --git a/test/build/config/defaults/dot-webpack-directory-webpackfile/multiple-location-config.test.js b/test/build/config/defaults/dot-webpack-directory-webpackfile/dot-webpack-webpackfile.test.js similarity index 76% rename from test/build/config/defaults/dot-webpack-directory-webpackfile/multiple-location-config.test.js rename to test/build/config/defaults/dot-webpack-directory-webpackfile/dot-webpack-webpackfile.test.js index 9a4960a5928..267c53daea9 100644 --- a/test/build/config/defaults/dot-webpack-directory-webpackfile/multiple-location-config.test.js +++ b/test/build/config/defaults/dot-webpack-directory-webpackfile/dot-webpack-webpackfile.test.js @@ -3,8 +3,8 @@ const { existsSync } = require("fs"); const { resolve } = require("path"); const { run } = require("../../../../utils/test-utils"); -describe("multiple dev config files with webpack.config.js", () => { - it("Uses webpack.config.development.js", async () => { +describe(".webpack webpackfile", () => { + it("should build and not throw with .webpack webpackfile", async () => { const { stdout, stderr, exitCode } = await run(__dirname, []); expect(exitCode).toEqual(0); expect(stderr).toBeFalsy(); From 83dc51e4c7f35c9be63c0af770bfef36b811cd59 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Mon, 13 Sep 2021 12:32:12 +0530 Subject: [PATCH 06/23] chore: fix description of cjs config --- .../config/defaults/cjs-config/default-cjs-config.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/build/config/defaults/cjs-config/default-cjs-config.test.js b/test/build/config/defaults/cjs-config/default-cjs-config.test.js index 80ff2007dc0..378bfeffb64 100644 --- a/test/build/config/defaults/cjs-config/default-cjs-config.test.js +++ b/test/build/config/defaults/cjs-config/default-cjs-config.test.js @@ -2,8 +2,8 @@ const fs = require("fs"); const path = require("path"); const { run, isWebpack5 } = require("../../../../utils/test-utils"); -describe("Default Config:", () => { - it("Should be able to pick cjs config by default", async () => { +describe("default config with cjs extention", () => { + it("should build and not throw error with cjs config by default", async () => { const { exitCode, stderr, stdout } = await run(__dirname, []); expect(exitCode).toEqual(0); From e9b603df640f151193d70939073eb8d57e876177 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Tue, 14 Sep 2021 09:07:56 +0530 Subject: [PATCH 07/23] chore: update mjs config --- .../config/defaults/mjs-config/default-mjs-config.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/build/config/defaults/mjs-config/default-mjs-config.test.js b/test/build/config/defaults/mjs-config/default-mjs-config.test.js index 1b73a13983d..44c37388349 100644 --- a/test/build/config/defaults/mjs-config/default-mjs-config.test.js +++ b/test/build/config/defaults/mjs-config/default-mjs-config.test.js @@ -2,8 +2,8 @@ const fs = require("fs"); const path = require("path"); const { run, isWebpack5 } = require("../../../../utils/test-utils"); -describe("Default Config:", () => { - it("Should be able to pick mjs config by default", async () => { +describe("default config with mjs extention", () => { + it("should build and not throw error with mjs config by default", async () => { const { exitCode, stderr, stdout } = await run(__dirname, [], { env: { WEBPACK_CLI_FORCE_LOAD_ESM_CONFIG: true }, }); From c1d4b2daa7e50cfd6b3f8d25592933b386af9e50 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Tue, 14 Sep 2021 10:21:02 +0530 Subject: [PATCH 08/23] chore: default config with mode --- ...ltiple-config.test.js => default-config-with-mode.test.js} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename test/build/config/defaults/with-mode/{multiple-config.test.js => default-config-with-mode.test.js} (75%) diff --git a/test/build/config/defaults/with-mode/multiple-config.test.js b/test/build/config/defaults/with-mode/default-config-with-mode.test.js similarity index 75% rename from test/build/config/defaults/with-mode/multiple-config.test.js rename to test/build/config/defaults/with-mode/default-config-with-mode.test.js index 189ca39770b..e93b2912638 100644 --- a/test/build/config/defaults/with-mode/multiple-config.test.js +++ b/test/build/config/defaults/with-mode/default-config-with-mode.test.js @@ -3,8 +3,8 @@ const { existsSync } = require("fs"); const { resolve } = require("path"); const { run } = require("../../../../utils/test-utils"); -describe("multiple config files", () => { - it("Uses dev config when development mode is supplied", async () => { +describe("default config with mode from cli", () => { + it("should build and not throw error with development mode supplied", async () => { const { stdout, stderr, exitCode } = await run(__dirname, ["--mode", "development"]); expect(exitCode).toEqual(0); expect(stderr).toBeFalsy(); From 9a100e32f2579a3a20b4afcf2795d6df16d899e2 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Thu, 16 Sep 2021 11:02:49 +0530 Subject: [PATCH 09/23] chore: fix empty test --- test/build/config/empty/empty.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/build/config/empty/empty.test.js b/test/build/config/empty/empty.test.js index eb87fab2587..48cc8d287a3 100644 --- a/test/build/config/empty/empty.test.js +++ b/test/build/config/empty/empty.test.js @@ -3,7 +3,7 @@ const { resolve } = require("path"); const { run } = require("../../../utils/test-utils"); describe("config flag with empty config file", () => { - it("should throw error with no configuration or index file", async () => { + it("should build and not throw error with no configuration or index file", async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ "-c", resolve(__dirname, "webpack.config.js"), From 06f0cf9b9bceb7bb36d054f8737ea847f2eb4171 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Thu, 16 Sep 2021 11:41:59 +0530 Subject: [PATCH 10/23] chore: update empty array --- test/build/config/empty-array/empty-array.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/build/config/empty-array/empty-array.test.js b/test/build/config/empty-array/empty-array.test.js index eb87fab2587..18143e32245 100644 --- a/test/build/config/empty-array/empty-array.test.js +++ b/test/build/config/empty-array/empty-array.test.js @@ -2,8 +2,8 @@ const { resolve } = require("path"); const { run } = require("../../../utils/test-utils"); -describe("config flag with empty config file", () => { - it("should throw error with no configuration or index file", async () => { +describe("config flag with config file returning empty array", () => { + it("should build and not throw error with no configuration or index file", async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ "-c", resolve(__dirname, "webpack.config.js"), From 8b0d0f4d3e25649ad2513c60cc70f69b86aeba4e Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Thu, 16 Sep 2021 12:02:37 +0530 Subject: [PATCH 11/23] chore: update empty function descriptions --- test/build/config/empty-function/empty-function.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/build/config/empty-function/empty-function.test.js b/test/build/config/empty-function/empty-function.test.js index eb87fab2587..b5033346ef2 100644 --- a/test/build/config/empty-function/empty-function.test.js +++ b/test/build/config/empty-function/empty-function.test.js @@ -2,8 +2,8 @@ const { resolve } = require("path"); const { run } = require("../../../utils/test-utils"); -describe("config flag with empty config file", () => { - it("should throw error with no configuration or index file", async () => { +describe("config file with function returning empty object", () => { + it("should build and not throw error with no configuration or index file", async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ "-c", resolve(__dirname, "webpack.config.js"), From 8b9497051ed8cd8e90cf0e2b4966cc50da0b84f3 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Thu, 16 Sep 2021 12:43:51 +0530 Subject: [PATCH 12/23] chore: update empty promise --- test/build/config/empty-promise/empty-promise.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/build/config/empty-promise/empty-promise.test.js b/test/build/config/empty-promise/empty-promise.test.js index eb87fab2587..1f841389596 100644 --- a/test/build/config/empty-promise/empty-promise.test.js +++ b/test/build/config/empty-promise/empty-promise.test.js @@ -2,8 +2,8 @@ const { resolve } = require("path"); const { run } = require("../../../utils/test-utils"); -describe("config flag with empty config file", () => { - it("should throw error with no configuration or index file", async () => { +describe("config file with promise resolving empty object", () => { + it("should build and not throw error with no configuration or index file", async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ "-c", resolve(__dirname, "webpack.config.js"), From 222f218f13e67a3047263eda5989347b82437d61 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Thu, 16 Sep 2021 13:04:56 +0530 Subject: [PATCH 13/23] chore: update config array error --- test/build/config/error-array/config-array-error.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/build/config/error-array/config-array-error.test.js b/test/build/config/error-array/config-array-error.test.js index a16f4e4f507..1db01c95366 100644 --- a/test/build/config/error-array/config-array-error.test.js +++ b/test/build/config/error-array/config-array-error.test.js @@ -1,7 +1,7 @@ "use strict"; const { run } = require("../../../utils/test-utils"); -describe("array config error", () => { +describe("config with invalid array syntax", () => { it("should throw syntax error and exit with non-zero exit code when even 1 object has syntax error", async () => { const { exitCode, stderr, stdout } = await run(__dirname, ["-c", "./webpack.config.js"]); expect(exitCode).toBe(2); From 82483ae04dc721e7409dfbde9725fa49240d7687 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Thu, 16 Sep 2021 13:26:28 +0530 Subject: [PATCH 14/23] chore: update no config --- test/build/config/no-config-array/no-config-array.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/build/config/no-config-array/no-config-array.test.js b/test/build/config/no-config-array/no-config-array.test.js index aa56ae7267c..157ce2cd831 100644 --- a/test/build/config/no-config-array/no-config-array.test.js +++ b/test/build/config/no-config-array/no-config-array.test.js @@ -3,8 +3,8 @@ const { resolve } = require("path"); const { run } = require("../../../utils/test-utils"); -describe("no configs in array", () => { - it("is able to understand and parse a very basic configuration file", async () => { +describe("config with empty array", () => { + it("should buils and not throw error with empty configuration", async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ "-c", resolve(__dirname, "webpack.config.js"), From 4396bd8e8d37e9d5ceaf75cb5d7e3022e140b3c6 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Sat, 18 Sep 2021 12:51:16 +0530 Subject: [PATCH 15/23] chore: update invalid path file --- test/build/config/invalid-path/a.js | 1 - test/build/config/invalid-path/invalid-path.test.js | 4 ++-- test/build/config/invalid-path/webpack.config.js | 9 --------- 3 files changed, 2 insertions(+), 12 deletions(-) delete mode 100644 test/build/config/invalid-path/a.js delete mode 100644 test/build/config/invalid-path/webpack.config.js diff --git a/test/build/config/invalid-path/a.js b/test/build/config/invalid-path/a.js deleted file mode 100644 index 0e9a8dc5145..00000000000 --- a/test/build/config/invalid-path/a.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = "a.js"; diff --git a/test/build/config/invalid-path/invalid-path.test.js b/test/build/config/invalid-path/invalid-path.test.js index d54df8c455e..4b9287e0532 100644 --- a/test/build/config/invalid-path/invalid-path.test.js +++ b/test/build/config/invalid-path/invalid-path.test.js @@ -2,8 +2,8 @@ const path = require("path"); const { run } = require("../../../utils/test-utils"); -describe("basic config file", () => { - it("is able to understand and parse a very basic configuration file", async () => { +describe("config with invalid path supplied by CLI", () => { + it("should throw error when invalid configuration path is passed to cli", async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ "-c", path.resolve(__dirname, "invalid-webpack.config.js"), diff --git a/test/build/config/invalid-path/webpack.config.js b/test/build/config/invalid-path/webpack.config.js deleted file mode 100644 index 9043cafbd4b..00000000000 --- a/test/build/config/invalid-path/webpack.config.js +++ /dev/null @@ -1,9 +0,0 @@ -const { resolve } = require("path"); - -module.exports = { - entry: "./a.js", - output: { - path: resolve(__dirname, "binary"), - filename: "a.bundle.js", - }, -}; From ba0bc3d929c74bc17dafcdce301151bc8f13aed4 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Sat, 18 Sep 2021 13:11:56 +0530 Subject: [PATCH 16/23] chore: update config error test --- test/build/config/error-commonjs/config-error.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/build/config/error-commonjs/config-error.test.js b/test/build/config/error-commonjs/config-error.test.js index e5baa11acde..4abf26ab8f1 100644 --- a/test/build/config/error-commonjs/config-error.test.js +++ b/test/build/config/error-commonjs/config-error.test.js @@ -2,7 +2,7 @@ const { resolve } = require("path"); const { run } = require("../../../utils/test-utils"); -describe("config error", () => { +describe("config with errors", () => { it("should throw error with invalid configuration", async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ "-c", From c8e63fcc8cddfe62ec75d7a4e4a731148c57aa0d Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Sat, 18 Sep 2021 13:35:10 +0530 Subject: [PATCH 17/23] chore: fix funtional config test --- test/build/config/function/functional-config.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/build/config/function/functional-config.test.js b/test/build/config/function/functional-config.test.js index d657588d99a..913d6c442c7 100644 --- a/test/build/config/function/functional-config.test.js +++ b/test/build/config/function/functional-config.test.js @@ -5,7 +5,7 @@ const { existsSync } = require("fs"); const { run } = require("../../../utils/test-utils"); describe("functional config", () => { - it("should work as expected in case of single config", async () => { + it("should build and not throw error with single configuration", async () => { const { stderr, stdout, exitCode } = await run(__dirname, [ "--config", resolve(__dirname, "single-webpack.config.js"), @@ -17,7 +17,7 @@ describe("functional config", () => { expect(existsSync(resolve(__dirname, "./dist/dist-single.js"))).toBeTruthy(); }); - it("should work as expected in case of multiple config", async () => { + it("should build and not throw errors with multiple configurations", async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ "--config", resolve(__dirname, "multi-webpack.config.js"), From e44fa0e3315f39ee83c242e37854fa9e0a27146b Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Sat, 18 Sep 2021 13:58:52 +0530 Subject: [PATCH 18/23] chore: invalid export --- test/build/config/invalid-export/invalid-export.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/build/config/invalid-export/invalid-export.test.js b/test/build/config/invalid-export/invalid-export.test.js index e47054e71df..7ebab784945 100644 --- a/test/build/config/invalid-export/invalid-export.test.js +++ b/test/build/config/invalid-export/invalid-export.test.js @@ -2,8 +2,8 @@ const { resolve } = require("path"); const { run } = require("../../../utils/test-utils"); -describe("invalid export", () => { - it("should throw error with no configuration or index file", async () => { +describe("config with invalid export", () => { + it("should throw error with configuration exporting invalid configuration", async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ "-c", resolve(__dirname, "webpack.config.js"), From 135df61470b2d56b6fffa6028c2ff3c56ace75b3 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Tue, 21 Sep 2021 10:33:14 +0530 Subject: [PATCH 19/23] chore: update multiple config test --- test/build/config/multiple/multiple-config.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/build/config/multiple/multiple-config.test.js b/test/build/config/multiple/multiple-config.test.js index c63293b0641..2ebe537929e 100644 --- a/test/build/config/multiple/multiple-config.test.js +++ b/test/build/config/multiple/multiple-config.test.js @@ -2,8 +2,8 @@ const { run } = require("../../../utils/test-utils"); -describe("Multiple config flag: ", () => { - it("spawns multiple compilers for multiple configs", async () => { +describe("multiple configuration files", () => { + it("should not throw error and spawn compilers for each configuration file", async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ "--config", "webpack1.config.js", From 4fde8e5550406947f5fa6818e23ce732d1939fa4 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Tue, 21 Sep 2021 13:36:26 +0530 Subject: [PATCH 20/23] chore: update config test --- .../multiple-with-one-compilation.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/build/config/multiple-with-one-compilation/multiple-with-one-compilation.test.js b/test/build/config/multiple-with-one-compilation/multiple-with-one-compilation.test.js index 180041bdce4..a15c12f5864 100644 --- a/test/build/config/multiple-with-one-compilation/multiple-with-one-compilation.test.js +++ b/test/build/config/multiple-with-one-compilation/multiple-with-one-compilation.test.js @@ -3,8 +3,8 @@ const { resolve } = require("path"); const { run } = require("../../../utils/test-utils"); -describe("basic config file", () => { - it("is able to understand and parse a very basic configuration file", async () => { +describe("config with single config in array", () => { + it("should build and not throw error with configuration file exporting single configuration in array", async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ "-c", resolve(__dirname, "webpack.config.js"), From a51361c8f24b4b12a41eba64de6971d00b7e2a3f Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Tue, 21 Sep 2021 13:56:16 +0530 Subject: [PATCH 21/23] chore: update no code test --- test/build/config/no-code/no-code.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/build/config/no-code/no-code.test.js b/test/build/config/no-code/no-code.test.js index e9515123b1c..a38c2986c7b 100644 --- a/test/build/config/no-code/no-code.test.js +++ b/test/build/config/no-code/no-code.test.js @@ -3,7 +3,7 @@ const { resolve } = require("path"); const { run } = require("../../../utils/test-utils"); describe("config flag with no code", () => { - it("should not throw error with no configuration or index file", async () => { + it("should build and not throw error with no configuration or index file", async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ "-c", resolve(__dirname, "webpack.config.js"), From 21d60beb52d265a774e3face89283df286107a03 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Tue, 21 Sep 2021 14:16:30 +0530 Subject: [PATCH 22/23] chore: update no config array test --- test/build/config/no-config-array/no-config-array.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/build/config/no-config-array/no-config-array.test.js b/test/build/config/no-config-array/no-config-array.test.js index 157ce2cd831..bbbeb4209c2 100644 --- a/test/build/config/no-config-array/no-config-array.test.js +++ b/test/build/config/no-config-array/no-config-array.test.js @@ -4,7 +4,7 @@ const { resolve } = require("path"); const { run } = require("../../../utils/test-utils"); describe("config with empty array", () => { - it("should buils and not throw error with empty configuration", async () => { + it("should build and not throw error with empty configuration", async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ "-c", resolve(__dirname, "webpack.config.js"), From c3d0744e46a7e9562d78d9b0b01cbb4cceca5569 Mon Sep 17 00:00:00 2001 From: Rishabh Chawla Date: Tue, 21 Sep 2021 14:38:29 +0530 Subject: [PATCH 23/23] chore: update no config object test --- test/build/config/no-config-object/no-config-object.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/build/config/no-config-object/no-config-object.test.js b/test/build/config/no-config-object/no-config-object.test.js index e88b1339d03..663117d8f00 100644 --- a/test/build/config/no-config-object/no-config-object.test.js +++ b/test/build/config/no-config-object/no-config-object.test.js @@ -4,7 +4,7 @@ const { resolve } = require("path"); const { run } = require("../../../utils/test-utils"); describe("empty config", () => { - it("should work", async () => { + it("should build and not throw error with empty object as configuration", async () => { const { exitCode, stderr, stdout } = await run(__dirname, [ "-c", resolve(__dirname, "webpack.config.js"),