From 771f7a3c8647cd9c75521b496944c68219696ac6 Mon Sep 17 00:00:00 2001 From: shuta13 Date: Mon, 18 Jul 2022 07:55:25 +0900 Subject: [PATCH] test: use `--disable-interpret` without transpilation --- .../disable-interpret/disable-interpret.test.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/build/config-format/disable-interpret/disable-interpret.test.js b/test/build/config-format/disable-interpret/disable-interpret.test.js index aeb6708bee2..846a15806d7 100644 --- a/test/build/config-format/disable-interpret/disable-interpret.test.js +++ b/test/build/config-format/disable-interpret/disable-interpret.test.js @@ -21,4 +21,12 @@ describe("webpack cli", () => { expect(exitCode).toBe(0); expect(existsSync(resolve(__dirname, "dist/foo.bundle.js"))).toBeTruthy(); }); + + it("should log error without transpilation", async () => { + const { exitCode, stderr, stdout } = await run(__dirname, ["--disable-interpret"]); + + expect(exitCode).toBe(2); + expect(stderr).toContain(`Failed to load '${resolve(__dirname, "webpack.config.ts")}' config`); + expect(stdout).toBeFalsy(); + }); });