Skip to content

Commit

Permalink
test(runner): update snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakaryCode committed Oct 19, 2022
1 parent f56b832 commit 87f267c
Show file tree
Hide file tree
Showing 11 changed files with 720 additions and 720 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3858,37 +3858,37 @@ exports[`babel should convert do expressions 2`] = `
}));
pathName = config.pageName;
pageConfig = handler.pageConfig;
_context.prev = 8;
_context.next = 11;
undefined.trigger(\\"__taroRouterChange\\", {
\\"toLocation\\": {
\\"path\\": pathName
}
});
_context.prev = 9;
_context.next = 12;
return (_b = pageConfig.load) === null || _b === void 0 ? void 0 : _b.call(pageConfig);
case 11:
case 12:
element = _context.sent;
if (element instanceof Array) {
element = element[0];
}
_context.next = 18;
_context.next = 19;
break;
case 15:
_context.prev = 15;
_context.t0 = _context[\\"catch\\"](8);
case 16:
_context.prev = 16;
_context.t0 = _context[\\"catch\\"](9);
throw new Error(_context.t0);
case 18:
case 19:
if (element) {
_context.next = 20;
_context.next = 21;
break;
}
return _context.abrupt(\\"return\\");
case 20:
case 21:
enablePullDownRefresh = ((_c = config === null || config === void 0 ? void 0 : config.window) === null || _c === void 0 ? void 0 : _c.enablePullDownRefresh) || false;
undefined.trigger(\\"__taroRouterChange\\", {
\\"toLocation\\": {
\\"path\\": pathName
}
});
if (pageConfig) {
setTitle((_d = pageConfig.navigationBarTitleText) !== null && _d !== void 0 ? _d : document.title);
if (typeof pageConfig.enablePullDownRefresh === \\"boolean\\") {
Expand All @@ -3908,7 +3908,7 @@ exports[`babel should convert do expressions 2`] = `
return _context.stop();
}
}
}), _callee, null, [ [ 8, 15 ] ]);
}), _callee, null, [ [ 9, 16 ] ]);
})));
}
var path_to_regexp = __webpack_require__(8);
Expand Down Expand Up @@ -4530,63 +4530,63 @@ exports[`babel should convert do expressions 2`] = `
switch (_context.prev = _context.next) {
case 0:
handler.pathname = decodeURI(location.pathname);
_context.prev = 1;
_context.next = 4;
undefined.trigger(\\"__taroRouterChange\\", {
\\"toLocation\\": {
\\"path\\": handler.pathname
}
});
_context.prev = 2;
_context.next = 5;
return router.resolve(handler.router.forcePath || handler.pathname);
case 4:
case 5:
result = _context.sent;
_context.next = 7;
_context.next = 8;
return Promise.all(result);
case 7:
case 8:
_yield$Promise$all = _context.sent;
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 3);
element = _yield$Promise$all2[0];
params = _yield$Promise$all2[2];
_context.next = 24;
_context.next = 25;
break;
case 13:
_context.prev = 13;
_context.t0 = _context[\\"catch\\"](1);
case 14:
_context.prev = 14;
_context.t0 = _context[\\"catch\\"](2);
if (!(_context.t0.status === 404)) {
_context.next = 19;
_context.next = 20;
break;
}
(_c = app.onPageNotFound) === null || _c === void 0 ? void 0 : _c.call(app, {
\\"path\\": handler.pathname
});
_context.next = 24;
_context.next = 25;
break;
case 19:
case 20:
if (!/Loading hot update .* failed./.test(_context.t0.message)) {
_context.next = 23;
_context.next = 24;
break;
}
window.location.reload();
_context.next = 24;
_context.next = 25;
break;
case 23:
case 24:
throw new Error(_context.t0);
case 24:
case 25:
if (element) {
_context.next = 26;
_context.next = 27;
break;
}
return _context.abrupt(\\"return\\");
case 26:
case 27:
pageConfig = handler.pageConfig;
enablePullDownRefresh = ((_d = config === null || config === void 0 ? void 0 : config.window) === null || _d === void 0 ? void 0 : _d.enablePullDownRefresh) || false;
undefined.trigger(\\"__taroRouterChange\\", {
\\"toLocation\\": {
\\"path\\": handler.pathname
}
});
if (pageConfig) {
document.title = (_e = pageConfig.navigationBarTitleText) !== null && _e !== void 0 ? _e : document.title;
setTitle((_f = pageConfig.navigationBarTitleText) !== null && _f !== void 0 ? _f : document.title);
Expand Down Expand Up @@ -4668,7 +4668,7 @@ exports[`babel should convert do expressions 2`] = `
return _context.stop();
}
}
}), _callee, null, [ [ 1, 13 ] ]);
}), _callee, null, [ [ 2, 14 ] ]);
})));
};
var routePath = addLeadingSlash(stripBasename(history_history.location.pathname, handler.basename));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3853,37 +3853,37 @@ exports[`compiler-macros - defineAppConfig and definePageConfig should read app
}));
pathName = config.pageName;
pageConfig = handler.pageConfig;
_context.prev = 8;
_context.next = 11;
undefined.trigger(\\"__taroRouterChange\\", {
\\"toLocation\\": {
\\"path\\": pathName
}
});
_context.prev = 9;
_context.next = 12;
return (_b = pageConfig.load) === null || _b === void 0 ? void 0 : _b.call(pageConfig);
case 11:
case 12:
element = _context.sent;
if (element instanceof Array) {
element = element[0];
}
_context.next = 18;
_context.next = 19;
break;
case 15:
_context.prev = 15;
_context.t0 = _context[\\"catch\\"](8);
case 16:
_context.prev = 16;
_context.t0 = _context[\\"catch\\"](9);
throw new Error(_context.t0);
case 18:
case 19:
if (element) {
_context.next = 20;
_context.next = 21;
break;
}
return _context.abrupt(\\"return\\");
case 20:
case 21:
enablePullDownRefresh = ((_c = config === null || config === void 0 ? void 0 : config.window) === null || _c === void 0 ? void 0 : _c.enablePullDownRefresh) || false;
undefined.trigger(\\"__taroRouterChange\\", {
\\"toLocation\\": {
\\"path\\": pathName
}
});
if (pageConfig) {
setTitle((_d = pageConfig.navigationBarTitleText) !== null && _d !== void 0 ? _d : document.title);
if (typeof pageConfig.enablePullDownRefresh === \\"boolean\\") {
Expand All @@ -3903,7 +3903,7 @@ exports[`compiler-macros - defineAppConfig and definePageConfig should read app
return _context.stop();
}
}
}), _callee, null, [ [ 8, 15 ] ]);
}), _callee, null, [ [ 9, 16 ] ]);
})));
}
var path_to_regexp = __webpack_require__(8);
Expand Down Expand Up @@ -4525,63 +4525,63 @@ exports[`compiler-macros - defineAppConfig and definePageConfig should read app
switch (_context.prev = _context.next) {
case 0:
handler.pathname = decodeURI(location.pathname);
_context.prev = 1;
_context.next = 4;
undefined.trigger(\\"__taroRouterChange\\", {
\\"toLocation\\": {
\\"path\\": handler.pathname
}
});
_context.prev = 2;
_context.next = 5;
return router.resolve(handler.router.forcePath || handler.pathname);
case 4:
case 5:
result = _context.sent;
_context.next = 7;
_context.next = 8;
return Promise.all(result);
case 7:
case 8:
_yield$Promise$all = _context.sent;
_yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 3);
element = _yield$Promise$all2[0];
params = _yield$Promise$all2[2];
_context.next = 24;
_context.next = 25;
break;
case 13:
_context.prev = 13;
_context.t0 = _context[\\"catch\\"](1);
case 14:
_context.prev = 14;
_context.t0 = _context[\\"catch\\"](2);
if (!(_context.t0.status === 404)) {
_context.next = 19;
_context.next = 20;
break;
}
(_c = app.onPageNotFound) === null || _c === void 0 ? void 0 : _c.call(app, {
\\"path\\": handler.pathname
});
_context.next = 24;
_context.next = 25;
break;
case 19:
case 20:
if (!/Loading hot update .* failed./.test(_context.t0.message)) {
_context.next = 23;
_context.next = 24;
break;
}
window.location.reload();
_context.next = 24;
_context.next = 25;
break;
case 23:
case 24:
throw new Error(_context.t0);
case 24:
case 25:
if (element) {
_context.next = 26;
_context.next = 27;
break;
}
return _context.abrupt(\\"return\\");
case 26:
case 27:
pageConfig = handler.pageConfig;
enablePullDownRefresh = ((_d = config === null || config === void 0 ? void 0 : config.window) === null || _d === void 0 ? void 0 : _d.enablePullDownRefresh) || false;
undefined.trigger(\\"__taroRouterChange\\", {
\\"toLocation\\": {
\\"path\\": handler.pathname
}
});
if (pageConfig) {
document.title = (_e = pageConfig.navigationBarTitleText) !== null && _e !== void 0 ? _e : document.title;
setTitle((_f = pageConfig.navigationBarTitleText) !== null && _f !== void 0 ? _f : document.title);
Expand Down Expand Up @@ -4663,7 +4663,7 @@ exports[`compiler-macros - defineAppConfig and definePageConfig should read app
return _context.stop();
}
}
}), _callee, null, [ [ 1, 13 ] ]);
}), _callee, null, [ [ 2, 14 ] ]);
})));
};
var routePath = addLeadingSlash(stripBasename(history_history.location.pathname, handler.basename));
Expand Down
Loading

0 comments on commit 87f267c

Please sign in to comment.