2021-10-20 16:08:31 +02:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
|
2021-10-22 11:56:56 +02:00
|
|
|
exports[`default props can set default required boolean values 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-22 11:56:56 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-22 11:56:56 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`default props can set default values 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-22 11:56:56 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-22 11:56:56 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`default props default values are also set whenever component is 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-10-22 11:56:56 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['state'].p}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-22 11:56:56 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
2021-10-20 16:08:31 +02:00
|
|
|
exports[`props validation can validate a prop with multiple types 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation can validate a prop with multiple types 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation can validate an array with given primitive type 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation can validate an array with given primitive type 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation can validate an array with multiple sub element types 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation can validate an array with multiple sub element types 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation can validate an array with multiple sub element types 3`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation can validate an object with simple shape 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation can validate an optional props 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation can validate an optional props 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation can validate recursively complicated prop def 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation can validate recursively complicated prop def 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
2021-10-22 11:56:56 +02:00
|
|
|
exports[`props validation default values are applied before validating props at update 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-22 11:56:56 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['state'].p}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-22 11:56:56 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
2021-10-20 16:08:31 +02:00
|
|
|
exports[`props validation props are validated in dev mode (code snapshot) 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {message: 1}
|
|
|
|
|
helpers.validateProps(\`Child\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`Child\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation props are validated whenever component is 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-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['state'].p}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation validate simple types 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation validate simple types 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation validate simple types 3`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation validate simple types 4`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation validate simple types 5`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation validate simple types 6`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation validate simple types, alternate form 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation validate simple types, alternate form 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation validate simple types, alternate form 3`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation validate simple types, alternate form 4`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation validate simple types, alternate form 5`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation validate simple types, alternate form 6`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
2021-11-19 13:43:21 +01:00
|
|
|
const props1 = {p: ctx['p']}
|
|
|
|
|
helpers.validateProps(\`SubComp\`, props1, ctx)
|
|
|
|
|
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
2021-10-20 16:08:31 +02:00
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`props validation validation is only done in dev mode 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
2021-11-29 13:22:04 +01:00
|
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
2021-10-20 16:08:31 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let b2 = component(\`SubComp\`, {}, key + \`__1\`, node, ctx);
|
|
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|