Skip to content

Commit 5853ec5

Browse files
committed
add test case
1 parent e037a5f commit 5853ec5

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
afterEach(() => {
2+
delete global.EXTERNAL_TEST_GLOBAL;
3+
});
4+
5+
it("should move externals in chunks into entry chunk", function() {
6+
global.EXTERNAL_TEST_GLOBAL = 42;
7+
// eslint-disable-next-line node/no-missing-require
8+
const result = require("external");
9+
expect(result).toBe(42);
10+
});
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
externals: {
3+
external: "global EXTERNAL_TEST_GLOBAL"
4+
}
5+
};

0 commit comments

Comments
 (0)