[FIX] t-out: allow expressions evaluating as number

This commit is contained in:
Géry Debongnie
2022-06-07 10:33:59 +02:00
committed by Sam Degueldre
parent 1fc88f626f
commit a3111eb9ca
3 changed files with 44 additions and 13 deletions
+5
View File
@@ -27,6 +27,11 @@ describe("t-out", () => {
expect(renderToString(template)).toBe("<span>ok</span>");
});
test("number literal", () => {
const template = `<span><t t-out="1"/></span>`;
expect(renderToString(template)).toBe("<span>1</span>");
});
test("literal, no outside html element", () => {
const template = `<t t-out="'ok'"/>`;
expect(renderToString(template)).toBe("ok");