Skip to content

Commit e54168f

Browse files
test: fix
1 parent 9911e6b commit e54168f

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

Diff for: test/TestCases.test.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,16 @@ describe('TestCases', () => {
179179
);
180180
} else {
181181
const matchAll = res.match(
182-
/__webpack_require__\.h = \(\) => "([\d\w].*)"/i
182+
/__webpack_require__\.h = \(\) => \(("[\d\w].*")\)/i
183183
);
184184

185185
const replacer = new Array(matchAll[1].length);
186186

187187
res = res.replace(
188-
/__webpack_require__\.h = \(\) => "([\d\w].*)"/i,
189-
`__webpack_require__.h = () => "${replacer.fill('x').join('')}"`
188+
/__webpack_require__\.h = \(\) => \(("[\d\w].*")\)/i,
189+
`__webpack_require__.h = () => ("${replacer
190+
.fill('x')
191+
.join('')}")`
190192
);
191193
}
192194

Diff for: test/cases/hmr/expected/webpack-5/main.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -364,12 +364,12 @@ module.exports = function (urlString) {
364364
/******/
365365
/******/ /* webpack/runtime/get update manifest filename */
366366
/******/ (() => {
367-
/******/ __webpack_require__.hmrF = () => "main." + __webpack_require__.h() + ".hot-update.json";
367+
/******/ __webpack_require__.hmrF = () => ("main." + __webpack_require__.h() + ".hot-update.json");
368368
/******/ })();
369369
/******/
370370
/******/ /* webpack/runtime/getFullHash */
371371
/******/ (() => {
372-
/******/ __webpack_require__.h = () => "xxxxxxxxxxxxxxxxxxxx"
372+
/******/ __webpack_require__.h = () => ("xxxxxxxxxxxxxxxxxxxxxx")
373373
/******/ })();
374374
/******/
375375
/******/ /* webpack/runtime/global */
@@ -386,7 +386,7 @@ module.exports = function (urlString) {
386386
/******/
387387
/******/ /* webpack/runtime/hasOwnProperty shorthand */
388388
/******/ (() => {
389-
/******/ __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop)
389+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
390390
/******/ })();
391391
/******/
392392
/******/ /* webpack/runtime/load script */
@@ -424,7 +424,7 @@ module.exports = function (urlString) {
424424
/******/ var doneFns = inProgress[url];
425425
/******/ delete inProgress[url];
426426
/******/ script.parentNode && script.parentNode.removeChild(script);
427-
/******/ doneFns && doneFns.forEach((fn) => fn(event));
427+
/******/ doneFns && doneFns.forEach((fn) => (fn(event)));
428428
/******/ if(prev) return prev(event);
429429
/******/ }
430430
/******/ ;

0 commit comments

Comments
 (0)