release: WRNexusJS 0.8.0
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
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"');
|
||||
});
|
||||
Reference in New Issue
Block a user