Files
WRNexusJS/packages/compiler/test/keep-alive.test.ts
T
Clintchiz 586a6db8ff
Quality / quality (ubuntu-latest) (push) Failing after 21s
Quality / quality (windows-latest) (push) Canceled after 0s
release: WRNexusJS 0.8.0
2026-08-02 23:18:51 +05:30

13 lines
486 B
TypeScript

import { expect, test } from "bun:test";
import { generate, parse } from "../src/index.ts";
test("KeepAlive compiles to a keyed live-instance preservation boundary", () => {
const output = generate(
parse(
`page Dashboard { navigation { preserve = ["component"] } view { <KeepAlive key="filters"><DashboardFilters /></KeepAlive> } }`,
),
);
expect(output).toContain('data-wrn-keepalive="filters"');
expect(output).not.toContain('data-component="KeepAlive"');
});