mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
9f2e2bcc66
This means that unrelated ids (eg the id of a template, variable or key) not longer share the same incrementing counter, meaning that you no longer see a variable named "v2" unless another variable "v1" was generated previously, this is also true for block data.
70 lines
1.7 KiB
Plaintext
70 lines
1.7 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`debugging t-debug 1`] = `
|
|
"function anonymous(bdom, helpers
|
|
) {
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
|
|
|
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]);
|
|
}
|
|
}"
|
|
`;
|
|
|
|
exports[`debugging t-debug on sub template 1`] = `
|
|
"function anonymous(bdom, helpers
|
|
) {
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
|
|
|
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, comment } = bdom;
|
|
let { getTemplate } = helpers;
|
|
const callTemplate_1 = getTemplate(\`sub\`);
|
|
|
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
let b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
|
return block1([], [b2]);
|
|
}
|
|
}"
|
|
`;
|
|
|
|
exports[`debugging t-log 1`] = `
|
|
"function anonymous(bdom, helpers
|
|
) {
|
|
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
|
|
|
let block1 = createBlock(\`<div/>\`);
|
|
|
|
return function template(ctx, node, key = \\"\\") {
|
|
ctx = Object.create(ctx);
|
|
ctx[isBoundary] = 1
|
|
setContextValue(ctx, \\"foo\\", 42);
|
|
console.log(ctx['foo']+3);
|
|
return block1();
|
|
}
|
|
}"
|
|
`;
|