Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Jun 20, 2018
1 parent e037a5f commit 5853ec5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/configCases/externals/global/index.js
@@ -0,0 +1,10 @@
afterEach(() => {
delete global.EXTERNAL_TEST_GLOBAL;
});

it("should move externals in chunks into entry chunk", function() {
global.EXTERNAL_TEST_GLOBAL = 42;
// eslint-disable-next-line node/no-missing-require
const result = require("external");
expect(result).toBe(42);
});
5 changes: 5 additions & 0 deletions test/configCases/externals/global/webpack.config.js
@@ -0,0 +1,5 @@
module.exports = {
externals: {
external: "global EXTERNAL_TEST_GLOBAL"
}
};

0 comments on commit 5853ec5

Please sign in to comment.