[REF] compiler: rename qweb/ into compiler/

This commit is contained in:
Géry Debongnie
2021-11-13 08:41:53 +01:00
committed by Samuel Degueldre
parent 4efe1ae166
commit 04334e23d7
50 changed files with 10 additions and 10 deletions
+29
View File
@@ -0,0 +1,29 @@
import { renderToString, snapshotEverything } from "../helpers";
snapshotEverything();
// -----------------------------------------------------------------------------
// comments
// -----------------------------------------------------------------------------
describe("comments", () => {
test("properly handle comments", () => {
const template = `<div>hello <!-- comment-->owl</div>`;
expect(renderToString(template)).toBe("<div>hello <!-- comment-->owl</div>");
});
test("only a comment", () => {
const template = `<!-- comment-->`;
expect(renderToString(template)).toBe(`<!-- comment-->`);
});
test("properly handle comments between t-if/t-else", () => {
const template = `
<div>
<span t-if="true">true</span>
<!-- comment-->
<span t-else="">owl</span>
</div>`;
expect(renderToString(template)).toBe("<div><span>true</span></div>");
});
});