Skip to content

Commit 325bf18

Browse files
committed
Fix tests
The new version of webpack has different runtime chunks
1 parent 4a533ee commit 325bf18

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"style-loader": "^2.0.0",
4646
"terser-webpack-plugin": "^5.1.1",
4747
"tmp": "^0.2.1",
48-
"webpack": "^5.12",
48+
"webpack": "^5.35",
4949
"webpack-cli": "^4",
5050
"webpack-dev-server": "^4.0.0-beta.0",
5151
"yargs-parser": "^20.2.4"

test/bin/encore.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,12 @@ module.exports = Encore.getWebpackConfig();
101101
expect(parsedOutput).to.be.an('object');
102102
expect(parsedOutput.modules).to.be.an('array');
103103

104-
// We expect 3 modules there:
104+
// We expect 4 modules there:
105+
// - webpack/runtime/chunk loaded
105106
// - webpack/runtime/jsonp chunk loading
106107
// - webpack/runtime/hasOwnProperty shorthand
107108
// - ./js/no_require.js
108-
expect(parsedOutput.modules.length).to.equal(3);
109+
expect(parsedOutput.modules.length).to.equal(4);
109110

110111

111112
done();

test/functional.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2666,18 +2666,18 @@ module.exports = {
26662666
webpackAssert.assertOutputJsonFileMatches('entrypoints.json', {
26672667
entrypoints: {
26682668
main: {
2669-
js: ['/build/runtime.js', '/build/961.js', '/build/38.js', '/build/main.js'],
2669+
js: ['/build/runtime.js', '/build/843.js', '/build/38.js', '/build/main.js'],
26702670
css: ['/build/38.css']
26712671
},
26722672
other: {
2673-
js: ['/build/runtime.js', '/build/961.js', '/build/38.js', '/build/other.js'],
2673+
js: ['/build/runtime.js', '/build/843.js', '/build/38.js', '/build/other.js'],
26742674
css: ['/build/38.css']
26752675
}
26762676
}
26772677
});
26782678

26792679
// make split chunks are correct in manifest
2680-
webpackAssert.assertManifestKeyExists('build/961.js');
2680+
webpackAssert.assertManifestKeyExists('build/843.js');
26812681

26822682
done();
26832683
});

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7257,7 +7257,7 @@ webpack-sources@^2.1.1:
72577257
source-list-map "^2.0.1"
72587258
source-map "^0.6.1"
72597259

7260-
webpack@^5.12:
7260+
webpack@^5.35:
72617261
version "5.35.0"
72627262
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.35.0.tgz#4db23c2b96c4e53a90c5732d7cdb301a84a33576"
72637263
integrity sha512-au3gu55yYF/h6NXFr0KZPZAYxS6Nlc595BzYPke8n0CSff5WXcoixtjh5LC/8mXunkRKxhymhXmBY0+kEbR6jg==

0 commit comments

Comments
 (0)