[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:
Géry Debongnie
2021-12-20 11:19:59 +01:00
committed by Aaron Bohy
parent ddc358f48a
commit 7eaecac0b5
48 changed files with 4157 additions and 3279 deletions
+9 -4
View File
@@ -1,5 +1,10 @@
import { xml } from "../../src";
import { renderToString, snapshotEverything, TestContext, trim } from "../helpers";
import {
renderToString,
snapshotEverything,
snapshotTemplate,
TestContext,
trim,
} from "../helpers";
snapshotEverything();
@@ -116,7 +121,7 @@ describe("misc", () => {
});
test("other complex template", () => {
xml`
snapshotTemplate(`
<div>
<header>
<nav class="navbar navbar-expand-md navbar-light bg-light">
@@ -257,6 +262,6 @@ describe("misc", () => {
</div>
</div>
</div>
</div>`;
</div>`);
});
});