Files
owl/tests/compiler/__snapshots__/qweb_memory.test.ts.snap
Géry Debongnie 2068196377 [IMP] compiler: generate templates in strict mode
Before this commit, generated template functions were not using strict
mode. This may be a bad idea, since strict mode could be more performant
in some cases.
2022-06-24 15:54:09 +02:00

26 lines
796 B
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`memory t-foreach does not leak stuff in global scope 1`] = `
"function anonymous(app, bdom, helpers
) {
\\"use strict\\";
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
let { prepareList, withKey } = helpers;
let block1 = createBlock(\`<p><block-child-0/></p>\`);
return function template(ctx, node, key = \\"\\") {
ctx = Object.create(ctx);
const [k_block2, v_block2, l_block2, c_block2] = prepareList([3,2,1]);;
for (let i1 = 0; i1 < l_block2; i1++) {
ctx[\`item\`] = v_block2[i1];
ctx[\`item_index\`] = i1;
const key1 = ctx['item_index'];
c_block2[i1] = withKey(text(ctx['item']), key1);
}
const b2 = list(c_block2);
return block1([], [b2]);
}
}"
`;