mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[REF] tests: improve test helpers
- remove snapshotApp - remove addTemplates - simplify helpers - make sure snapshotted templates are snapshotted with the app config
This commit is contained in:
committed by
Aaron Bohy
parent
ddc358f48a
commit
7eaecac0b5
@@ -1,5 +1,5 @@
|
||||
import { TemplateSet } from "../../src/app/template_set";
|
||||
import { renderToString, TestContext, compile } from "../helpers";
|
||||
import { renderToString, snapshotTemplate, TestContext } from "../helpers";
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// basic validation
|
||||
@@ -21,7 +21,7 @@ describe("basic validation", () => {
|
||||
|
||||
test("invalid xml", () => {
|
||||
const template = "<div>";
|
||||
expect(() => compile(template)).toThrow("Invalid XML in template");
|
||||
expect(() => snapshotTemplate(template)).toThrow("Invalid XML in template");
|
||||
});
|
||||
|
||||
test("missing template in template set", () => {
|
||||
|
||||
Reference in New Issue
Block a user