Skip to content

Commit fe16998

Browse files
committed
udpate tests
1 parent 8354f16 commit fe16998

File tree

23 files changed

+74
-23
lines changed

23 files changed

+74
-23
lines changed

declarations/WebpackOptions.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1699,7 +1699,7 @@ export interface Optimization {
16991699
/**
17001700
* Avoid wrapping the entry module in an IIFE.
17011701
*/
1702-
avoidEntryIife?: "development" | "production" | true | false;
1702+
avoidEntryIife?: boolean;
17031703
/**
17041704
* Check for incompatible wasm types when importing/exporting from/to ESM.
17051705
*/

schemas/WebpackOptions.check.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

test/configCases/output-module/inlined-module/test.config.js renamed to test/configCases/output-module/iife-entry-module-with-others/test.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = {
33
return [
44
"module-avoidEntryIife-false.mjs",
55
"module-avoidEntryIife-true.mjs",
6-
"bundle0.js"
6+
"test.js"
77
];
88
}
99
};

test/configCases/output-module/inlined-module/test.js renamed to test/configCases/output-module/iife-entry-module-with-others/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ const path = require("path");
44
it("IIFE should present when `avoidEntryIife` is disabled, and avoided when true", () => {
55
const trueSource = fs.readFileSync(path.join(__dirname, "module-avoidEntryIife-true.mjs"), "utf-8");
66
const falseSource = fs.readFileSync(path.join(__dirname, "module-avoidEntryIife-false.mjs"), "utf-8");
7-
expect(trueSource).toContain(`This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.`);
8-
expect(falseSource).not.toMatch(`This entry need to be wrapped in an IIFE`);
7+
expect(trueSource).not.toContain('This entry need to be wrapped in an IIFE');
8+
expect(falseSource).toContain('This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.');
99
});

test/configCases/output-module/inlined-module/webpack.config.js renamed to test/configCases/output-module/iife-entry-module-with-others/webpack.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/** @type {import("../../../../").Configuration} */
1+
/** @type {import("../../../../types").Configuration} */
22
const base = {
33
output: {
44
module: true
@@ -12,7 +12,7 @@ const base = {
1212
target: "es2020"
1313
};
1414

15-
/** @type {import("../../../../").Configuration[]} */
15+
/** @type {import("../../../../types").Configuration[]} */
1616
module.exports = [
1717
{
1818
...base,
@@ -40,7 +40,7 @@ module.exports = [
4040
name: "test-output",
4141
entry: "./test.js",
4242
output: {
43-
filename: "bundle0.js"
43+
filename: "test.js"
4444
}
4545
}
4646
];
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = 'foo'

0 commit comments

Comments
 (0)