Files
owl/tests/compiler/__snapshots__/white_space.test.ts.snap
T
2022-02-11 10:46:44 +01:00

90 lines
3.1 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`white space handling consecutives whitespaces are condensed into a single space 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> abc </div>\`);
return function template(ctx, node, key = \\"\\") {
return block1();
}
}"
`;
exports[`white space handling nothing is done in pre tags 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(\`<pre> </pre>\`);
return function template(ctx, node, key = \\"\\") {
return block1();
}
}"
`;
exports[`white space handling nothing is done in pre tags 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(\`<pre>
some text
</pre>\`);
return function template(ctx, node, key = \\"\\") {
return block1();
}
}"
`;
exports[`white space handling nothing is done in pre tags 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(\`<pre>
</pre>\`);
return function template(ctx, node, key = \\"\\") {
return block1();
}
}"
`;
exports[`white space handling white space only text nodes are condensed into a single space 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> </div>\`);
return function template(ctx, node, key = \\"\\") {
return block1();
}
}"
`;
exports[`white space handling whitespace only text nodes with newlines are removed 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><span>abc</span></div>\`);
return function template(ctx, node, key = \\"\\") {
return block1();
}
}"
`;