2020-11-26 16:45:25 +01:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
|
2021-11-08 10:30:36 +01:00
|
|
|
exports[`basics display a nice error if it cannot find component 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
return component(\`SomeMispelledComponent\`, {}, key + \`__1\`, node, ctx);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
2020-11-26 16:45:25 +01:00
|
|
|
exports[`basics no component catching error lead to full app destruction 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2020-11-26 16:45:25 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div>hey<block-text-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let d1 = ctx['props'].flag&&ctx['state'].this.will.crash;
|
|
|
|
|
return block1([d1]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`basics no component catching error lead to full app destruction 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2020-11-26 16:45:25 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let b2 = component(\`ErrorComponent\`, {flag: ctx['state'].flag}, key + \`__1\`, node, ctx);
|
|
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
exports[`basics simple catchError 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let d1 = ctx['a'].b.c;
|
|
|
|
|
return block1([d1]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`basics simple catchError 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let b2,b3;
|
|
|
|
|
if (ctx['error']) {
|
|
|
|
|
b2 = text(\`Error\`);
|
|
|
|
|
} else {
|
|
|
|
|
b3 = component(\`Boom\`, {}, key + \`__1\`, node, ctx);
|
|
|
|
|
}
|
|
|
|
|
return block1([], [b2, b3]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in a component render function 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div>hey<block-text-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let d1 = ctx['props'].flag&&ctx['state'].this.will.crash;
|
|
|
|
|
return block1([d1]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in a component render function 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/><block-child-1/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let b2,b3;
|
|
|
|
|
if (ctx['state'].error) {
|
|
|
|
|
b2 = text(\`Error handled\`);
|
|
|
|
|
} else {
|
2021-11-19 13:43:21 +01:00
|
|
|
b3 = callSlot(ctx, node, key, 'default', false, {});
|
2021-11-08 10:30:36 +01:00
|
|
|
}
|
|
|
|
|
return block1([], [b2, b3]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in a component render function 3`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
2021-11-25 14:50:40 +01:00
|
|
|
function slot1(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
return component(\`ErrorComponent\`, {flag: ctx['state'].flag}, key + \`__2\`, node, ctx);
|
2021-11-08 10:30:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
let b3 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
2021-11-08 10:30:36 +01:00
|
|
|
return block1([], [b3]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in the constructor call of a component render function 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div>Some text</div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
return block1();
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in the constructor call of a component render function 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/><block-child-1/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let b2,b3;
|
|
|
|
|
if (ctx['state'].error) {
|
|
|
|
|
b2 = text(\`Error handled\`);
|
|
|
|
|
} else {
|
2021-11-19 13:43:21 +01:00
|
|
|
b3 = callSlot(ctx, node, key, 'default', false, {});
|
2021-11-08 10:30:36 +01:00
|
|
|
}
|
|
|
|
|
return block1([], [b2, b3]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
2021-11-16 16:26:39 +01:00
|
|
|
exports[`can catch errors can catch an error in the constructor call of a component render function 2 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-16 16:26:39 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
|
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div>classic</div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
return block1();
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in the constructor call of a component render function 2 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-16 16:26:39 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
|
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div>Some text</div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
return block1();
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in the constructor call of a component render function 2 3`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-16 16:26:39 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
|
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/><block-child-1/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let b2,b3;
|
|
|
|
|
if (ctx['state'].error) {
|
|
|
|
|
b2 = text(\`Error handled\`);
|
|
|
|
|
} else {
|
2021-11-19 13:43:21 +01:00
|
|
|
b3 = callSlot(ctx, node, key, 'default', false, {});
|
2021-11-16 16:26:39 +01:00
|
|
|
}
|
|
|
|
|
return block1([], [b2, b3]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in the constructor call of a component render function 2 4`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-16 16:26:39 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
|
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
2021-11-25 14:50:40 +01:00
|
|
|
function slot1(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
let b3 = component(\`ClassicCompoent\`, {}, key + \`__2\`, node, ctx);
|
|
|
|
|
let b4 = component(\`ErrorComponent\`, {}, key + \`__3\`, node, ctx);
|
2021-11-16 16:26:39 +01:00
|
|
|
return multi([b3, b4]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
let b5 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__4\`, node, ctx);
|
2021-11-16 16:26:39 +01:00
|
|
|
return block1([], [b5]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
2021-11-08 10:30:36 +01:00
|
|
|
exports[`can catch errors can catch an error in the constructor call of a component render function 3`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
2021-11-25 14:50:40 +01:00
|
|
|
function slot1(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
return component(\`ErrorComponent\`, {}, key + \`__2\`, node, ctx);
|
2021-11-08 10:30:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
let b3 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
2021-11-08 10:30:36 +01:00
|
|
|
return block1([], [b3]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in the initial call of a component render function (parent mounted) 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div>hey<block-text-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let d1 = ctx['state'].this.will.crash;
|
|
|
|
|
return block1([d1]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in the initial call of a component render function (parent mounted) 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/><block-child-1/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let b2,b3;
|
|
|
|
|
if (ctx['state'].error) {
|
|
|
|
|
b2 = text(\`Error handled\`);
|
|
|
|
|
} else {
|
2021-11-19 13:43:21 +01:00
|
|
|
b3 = callSlot(ctx, node, key, 'default', false, {});
|
2021-11-08 10:30:36 +01:00
|
|
|
}
|
|
|
|
|
return block1([], [b2, b3]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in the initial call of a component render function (parent mounted) 3`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
2021-11-25 14:50:40 +01:00
|
|
|
function slot1(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
return component(\`ErrorComponent\`, {}, key + \`__2\`, node, ctx);
|
2021-11-08 10:30:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
let b3 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
2021-11-08 10:30:36 +01:00
|
|
|
return block1([], [b3]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in the initial call of a component render function (parent updated) 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div>hey<block-text-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let d1 = ctx['state'].this.will.crash;
|
|
|
|
|
return block1([d1]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in the initial call of a component render function (parent updated) 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/><block-child-1/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let b2,b3;
|
|
|
|
|
if (ctx['state'].error) {
|
|
|
|
|
b2 = text(\`Error handled\`);
|
|
|
|
|
} else {
|
2021-11-19 13:43:21 +01:00
|
|
|
b3 = callSlot(ctx, node, key, 'default', false, {});
|
2021-11-08 10:30:36 +01:00
|
|
|
}
|
|
|
|
|
return block1([], [b2, b3]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in the initial call of a component render function (parent updated) 3`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
2021-11-25 14:50:40 +01:00
|
|
|
function slot1(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
return component(\`ErrorComponent\`, {}, key + \`__2\`, node, ctx);
|
2021-11-08 10:30:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let b3;
|
|
|
|
|
if (ctx['state'].flag) {
|
2021-11-19 13:43:21 +01:00
|
|
|
b3 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
2021-11-08 10:30:36 +01:00
|
|
|
}
|
|
|
|
|
return block1([], [b3]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
2021-11-30 08:14:01 +01:00
|
|
|
exports[`can catch errors can catch an error in the mounted call (in child of child) 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
|
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
|
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
|
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div>Some text</div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
return block1();
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in the mounted call (in child of child) 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
|
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
|
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
|
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let b2,b3;
|
|
|
|
|
if (ctx['state'].error) {
|
|
|
|
|
b2 = text(\`Error handled\`);
|
|
|
|
|
} else {
|
|
|
|
|
b3 = component(\`Boom\`, {}, key + \`__1\`, node, ctx);
|
|
|
|
|
}
|
|
|
|
|
return block1([], [b2, b3]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in the mounted call (in child of child) 3`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
|
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
|
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
|
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let b2 = component(\`C\`, {}, key + \`__1\`, node, ctx);
|
|
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in the mounted call (in child of child) 4`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
|
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
|
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
return component(\`B\`, {}, key + \`__1\`, node, ctx);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in the mounted call (in root component) 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
|
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
|
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
|
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div>Some text</div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
return block1();
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in the mounted call (in root component) 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
|
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
|
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
|
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let b2,b3;
|
|
|
|
|
if (ctx['state'].error) {
|
|
|
|
|
b2 = text(\`Error handled\`);
|
|
|
|
|
} else {
|
|
|
|
|
b3 = component(\`ErrorComponent\`, {}, key + \`__1\`, node, ctx);
|
|
|
|
|
}
|
|
|
|
|
return block1([], [b2, b3]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
2021-11-17 11:06:24 +01:00
|
|
|
exports[`can catch errors can catch an error in the mounted call 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-17 11:06:24 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
|
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div>Some text</div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
return block1();
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in the mounted call 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-17 11:06:24 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
|
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/><block-child-1/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let b2,b3;
|
|
|
|
|
if (ctx['state'].error) {
|
|
|
|
|
b2 = text(\`Error handled\`);
|
|
|
|
|
} else {
|
2021-11-19 13:43:21 +01:00
|
|
|
b3 = callSlot(ctx, node, key, 'default', false, {});
|
2021-11-17 11:06:24 +01:00
|
|
|
}
|
|
|
|
|
return block1([], [b2, b3]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in the mounted call 3`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-17 11:06:24 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
|
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
2021-11-25 14:50:40 +01:00
|
|
|
function slot1(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
return component(\`ErrorComponent\`, {}, key + \`__2\`, node, ctx);
|
2021-11-17 11:06:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
let b3 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
2021-11-17 11:06:24 +01:00
|
|
|
return block1([], [b3]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in the willPatch call 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-17 11:06:24 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
|
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let d1 = ctx['props'].message;
|
|
|
|
|
return block1([d1]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in the willPatch call 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-17 11:06:24 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
|
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/><block-child-1/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let b2,b3;
|
|
|
|
|
if (ctx['state'].error) {
|
|
|
|
|
b2 = text(\`Error handled\`);
|
|
|
|
|
} else {
|
2021-11-19 13:43:21 +01:00
|
|
|
b3 = callSlot(ctx, node, key, 'default', false, {});
|
2021-11-17 11:06:24 +01:00
|
|
|
}
|
|
|
|
|
return block1([], [b2, b3]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in the willPatch call 3`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-17 11:06:24 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
|
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><span><block-text-0/></span><block-child-0/></div>\`);
|
|
|
|
|
|
2021-11-25 14:50:40 +01:00
|
|
|
function slot1(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
return component(\`ErrorComponent\`, {message: ctx['state'].message}, key + \`__2\`, node, ctx);
|
2021-11-17 11:06:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let d1 = ctx['state'].message;
|
2021-11-19 13:43:21 +01:00
|
|
|
let b3 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
2021-11-17 11:06:24 +01:00
|
|
|
return block1([d1], [b3]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
2021-11-08 10:30:36 +01:00
|
|
|
exports[`can catch errors can catch an error in the willStart call 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div>Some text</div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
return block1();
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in the willStart call 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/><block-child-1/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let b2,b3;
|
|
|
|
|
if (ctx['state'].error) {
|
|
|
|
|
b2 = text(\`Error handled\`);
|
|
|
|
|
} else {
|
2021-11-19 13:43:21 +01:00
|
|
|
b3 = callSlot(ctx, node, key, 'default', false, {});
|
2021-11-08 10:30:36 +01:00
|
|
|
}
|
|
|
|
|
return block1([], [b2, b3]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error in the willStart call 3`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
2021-11-25 14:50:40 +01:00
|
|
|
function slot1(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
return component(\`ErrorComponent\`, {}, key + \`__2\`, node, ctx);
|
2021-11-08 10:30:36 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
let b3 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
2021-11-08 10:30:36 +01:00
|
|
|
return block1([], [b3]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
2021-11-16 16:26:39 +01:00
|
|
|
exports[`can catch errors can catch an error origination from a child's willStart function 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-16 16:26:39 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
|
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div>classic</div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
return block1();
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error origination from a child's willStart function 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-16 16:26:39 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
|
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div>Some text</div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
return block1();
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error origination from a child's willStart function 3`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-16 16:26:39 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
|
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/><block-child-1/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let b2,b3;
|
|
|
|
|
if (ctx['state'].error) {
|
|
|
|
|
b2 = text(\`Error handled\`);
|
|
|
|
|
} else {
|
2021-11-19 13:43:21 +01:00
|
|
|
b3 = callSlot(ctx, node, key, 'default', false, {});
|
2021-11-16 16:26:39 +01:00
|
|
|
}
|
|
|
|
|
return block1([], [b2, b3]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors can catch an error origination from a child's willStart function 4`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-16 16:26:39 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
|
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
2021-11-25 14:50:40 +01:00
|
|
|
function slot1(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
let b3 = component(\`ClassicCompoent\`, {}, key + \`__2\`, node, ctx);
|
|
|
|
|
let b4 = component(\`ErrorComponent\`, {}, key + \`__3\`, node, ctx);
|
2021-11-16 16:26:39 +01:00
|
|
|
return multi([b3, b4]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
let b5 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__4\`, node, ctx);
|
2021-11-16 16:26:39 +01:00
|
|
|
return block1([], [b5]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
2021-11-08 10:30:36 +01:00
|
|
|
exports[`can catch errors catchError in catchError 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let d1 = ctx['a'].b.c;
|
|
|
|
|
return block1([d1]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors catchError in catchError 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let b2 = component(\`Boom\`, {}, key + \`__1\`, node, ctx);
|
|
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`can catch errors catchError in catchError 3`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let b2,b3;
|
|
|
|
|
if (ctx['error']) {
|
|
|
|
|
b2 = text(\`Error\`);
|
|
|
|
|
} else {
|
|
|
|
|
b3 = component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
|
|
|
|
}
|
|
|
|
|
return block1([], [b2, b3]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`errors and promises a rendering error in a sub component will reject the mount promise 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let d1 = this.will.crash;
|
|
|
|
|
return block1([d1]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`errors and promises a rendering error in a sub component will reject the mount promise 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let b2 = component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
|
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`errors and promises a rendering error will reject the mount promise 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let d1 = this.will.crash;
|
|
|
|
|
return block1([d1]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`errors and promises a rendering error will reject the render promise (with sub components) 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<span/>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
return block1();
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`errors and promises a rendering error will reject the render promise (with sub components) 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/><block-text-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let b2 = component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
|
|
|
|
let d1 = ctx['x'].y;
|
|
|
|
|
return block1([d1], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`errors and promises a rendering error will reject the render promise 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let b2;
|
|
|
|
|
if (ctx['flag']) {
|
|
|
|
|
b2 = text(this.will.crash);
|
|
|
|
|
}
|
|
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`errors and promises an error in mounted call will reject the mount promise 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div>abc</div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
return block1();
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`errors and promises an error in patched call will reject the render promise 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let d1 = ctx['val'];
|
|
|
|
|
return block1([d1]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`errors and promises an error in willPatch call will reject the render promise 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let d1 = ctx['val'];
|
|
|
|
|
return block1([d1]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`errors and promises errors in mounted and in willUnmount 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-11-15 15:01:56 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber, safeOutput } = helpers;
|
2021-11-08 10:30:36 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div/>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
return block1();
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|