mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] component,qweb: props validation
We re-add the possibility to validate props when dev mode is active. No change in the API right Now. The dev mode is activated via the configure method of App class.
This commit is contained in:
committed by
Géry Debongnie
parent
d1425c7100
commit
6e0834ce5e
@@ -15,7 +15,9 @@ describe("error handling", () => {
|
||||
test("cannot add twice the same template", () => {
|
||||
const context = new TestContext();
|
||||
context.addTemplate("test", `<t></t>`);
|
||||
expect(() => context.addTemplate("test", "<div/>", { allowDuplicate: true })).not.toThrow("already defined");
|
||||
expect(() => context.addTemplate("test", "<div/>", { allowDuplicate: true })).not.toThrow(
|
||||
"already defined"
|
||||
);
|
||||
expect(() => context.addTemplate("test", "<div/>")).toThrow("already defined");
|
||||
});
|
||||
|
||||
@@ -37,4 +39,4 @@ describe("error handling", () => {
|
||||
"Unknown QWeb directive: 't-best-beer'"
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import {
|
||||
renderToString,
|
||||
snapshotEverything,
|
||||
} from "../helpers";
|
||||
import { renderToString, snapshotEverything } from "../helpers";
|
||||
|
||||
snapshotEverything();
|
||||
|
||||
@@ -28,4 +25,4 @@ describe("qweb t-tag", () => {
|
||||
const expected = `<div taste=\"raspberry\" class=\"blueberry\">gooseberry</div>`;
|
||||
expect(renderToString(template, { tag: "div" })).toBe(expected);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user