Skip to content

Commit

Permalink
test: update
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Mar 19, 2023
1 parent 9adfd5f commit a408f54
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions test/build/config/named-export/mjs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ const { run } = require("../../../utils/test-utils");

describe("webpack cli", () => {
it("should support mjs config format", async () => {
const { exitCode, stderr, stdout } = await run(__dirname, ["-c", "webpack.config.mjs"], {
const { exitCode, stderr } = await run(__dirname, ["-c", "webpack.config.mjs"], {
env: { WEBPACK_CLI_FORCE_LOAD_ESM_CONFIG: true },
});

if (/Error: Not supported/.test(stderr)) {
expect(exitCode).toBe(2);
expect(stdout).toBeFalsy();
} else {
expect(exitCode).toBe(2);
expect(stderr).toMatch(/Unable to find default export./);
expect(stdout).toBeTruthy();
}
});
});

0 comments on commit a408f54

Please sign in to comment.