From 97780e1c1621176e4883adfb6c448a652571497f Mon Sep 17 00:00:00 2001 From: Jason Anderson Date: Tue, 28 Oct 2014 12:24:26 +0100 Subject: [PATCH] Updates hash length tests to catch async chunk loading --- test/configCases/hash-length/output-filename/chunk.js | 1 + test/configCases/hash-length/output-filename/index.js | 7 +++++-- .../hash-length/output-filename/webpack.config.js | 6 ++++-- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 test/configCases/hash-length/output-filename/chunk.js diff --git a/test/configCases/hash-length/output-filename/chunk.js b/test/configCases/hash-length/output-filename/chunk.js new file mode 100644 index 000000000..5ac3a600d --- /dev/null +++ b/test/configCases/hash-length/output-filename/chunk.js @@ -0,0 +1 @@ +module.exports = "chunk"; diff --git a/test/configCases/hash-length/output-filename/index.js b/test/configCases/hash-length/output-filename/index.js index 374432b5c..05c547652 100644 --- a/test/configCases/hash-length/output-filename/index.js +++ b/test/configCases/hash-length/output-filename/index.js @@ -1,3 +1,6 @@ -it("should compile and run the test", function () { - +it("should compile and run the test", function (done) { + require(['./chunk'], function () { + it("should load additional chunks", function () {}); + done(); + }); }); diff --git a/test/configCases/hash-length/output-filename/webpack.config.js b/test/configCases/hash-length/output-filename/webpack.config.js index 9957d23ec..786b1296d 100644 --- a/test/configCases/hash-length/output-filename/webpack.config.js +++ b/test/configCases/hash-length/output-filename/webpack.config.js @@ -8,10 +8,12 @@ module.exports = [{ } }, { output: { - filename: 'bundle.[chunkhash:8].js' + filename: 'bundle.[hash].js', + chunkFilename: '[id].bundle.[hash:8].js' } }, { output: { - filename: 'bundle.[chunkhash].js' + filename: 'bundle.[hash:6].js', + chunkFilename: '[id].bundle.[hash:8].js' } }];