From 06e9a5709b502bbd9f0329dde65197aea24507c6 Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Sat, 24 Mar 2018 12:06:46 +0100 Subject: [PATCH] get rid of webpackJsonp global leak --- test/ConfigTestCases.test.js | 1 + test/configCases/hash-length/output-filename/test.config.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/test/ConfigTestCases.test.js b/test/ConfigTestCases.test.js index 0a24486ff40..64cd0f2eeff 100644 --- a/test/ConfigTestCases.test.js +++ b/test/ConfigTestCases.test.js @@ -226,6 +226,7 @@ describe("ConfigTestCases", () => { ); if (exportedTests < filesCount) return done(new Error("No tests exported by test case")); + if (testConfig.afterExecute) testConfig.afterExecute(); process.nextTick(done); }); }); diff --git a/test/configCases/hash-length/output-filename/test.config.js b/test/configCases/hash-length/output-filename/test.config.js index db9bb3bf1ec..d77b4a23fbe 100644 --- a/test/configCases/hash-length/output-filename/test.config.js +++ b/test/configCases/hash-length/output-filename/test.config.js @@ -44,5 +44,8 @@ module.exports = { } return "./" + filename; + }, + afterExecute: () => { + delete global.webpackJsonp; } };