2020-11-26 16:45:25 +01:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
|
|
|
|
|
exports[`debugging t-debug 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
|
|
|
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
2021-11-02 11:29:23 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber } = helpers;
|
2020-11-26 16:45:25 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
let block2 = createBlock(\`<span>hey</span>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
debugger;
|
|
|
|
|
let b2;
|
|
|
|
|
if (true) {
|
|
|
|
|
debugger;
|
|
|
|
|
b2 = block2();
|
|
|
|
|
}
|
|
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
2021-10-25 09:30:58 +02:00
|
|
|
exports[`debugging t-debug on sub template 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
|
|
|
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
2021-11-02 11:29:23 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber } = helpers;
|
2021-10-25 09:30:58 +02:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<p>coucou</p>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
debugger;
|
|
|
|
|
return block1();
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
|
|
|
|
exports[`debugging t-debug on sub template 2`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
|
|
|
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
2021-11-02 11:29:23 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber } = helpers;
|
2021-10-25 09:30:58 +02:00
|
|
|
const callTemplate_2 = getTemplate(\`sub\`);
|
|
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
|
|
|
|
return block1([], [b2]);
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|
|
|
|
|
|
2020-11-26 16:45:25 +01:00
|
|
|
exports[`debugging t-log 1`] = `
|
|
|
|
|
"function anonymous(bdom, helpers
|
|
|
|
|
) {
|
|
|
|
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
2021-11-02 11:29:23 +01:00
|
|
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue, toNumber } = helpers;
|
2020-11-26 16:45:25 +01:00
|
|
|
|
|
|
|
|
let block1 = createBlock(\`<div/>\`);
|
|
|
|
|
|
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
|
|
|
ctx = Object.create(ctx);
|
2021-10-19 11:00:26 +02:00
|
|
|
ctx[isBoundary] = 1
|
|
|
|
|
setContextValue(ctx, \\"foo\\", 42);
|
2020-11-26 16:45:25 +01:00
|
|
|
console.log(ctx['foo']+3);
|
|
|
|
|
return block1();
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
`;
|