fix: harden generated identifiers and types
This commit is contained in:
@@ -1387,3 +1387,14 @@ test("style blocks compile with stable page/component/layout metadata", () => {
|
||||
expect(layout).toContain("export const __wrnexusStyles");
|
||||
expect(page).toMatch(/data-wrnexus-style-id="wrn-page-[a-z0-9]+"/);
|
||||
});
|
||||
|
||||
test("strict-mode reserved prop names compile through safe local references", () => {
|
||||
const output = compileWireFile(`component Visibility {
|
||||
props { private: boolean = false }
|
||||
view { {#if private}<span>Private</span>{/if} }
|
||||
}`);
|
||||
|
||||
expect(output).toContain("const __p_private: boolean");
|
||||
expect(output).toContain("(__p_private) ?");
|
||||
expect(output).not.toContain("const private:");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user