finish CSS delivery and generated type remediation
Quality / quality (ubuntu-latest) (push) Failing after 12m54s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
2026-08-10 00:17:25 +05:30
parent 232d8e6734
commit bca9549f3a
11 changed files with 277 additions and 18 deletions
@@ -38,4 +38,39 @@ describe("syntax contract and security diagnostics", () => {
expect(codes).toContain("WRN-SEC-STRING-TIMER");
expect(codes).toContain("WRN-PERSIST-SENSITIVE");
});
test.each([
[
"server output call",
`component Bad { outputs { save() } functions { server function run(): void { output.save() } } view { <div></div> } }`,
"WRN-OUTPUT-SERVER-CALL",
],
[
"unknown output call",
`component Bad { functions { client function run(): void { output.missing() } } view { <button @click="run()">Run</button> } }`,
"WRN-OUTPUT-UNKNOWN",
],
[
"server API in client function",
`component Bad { functions { client function run(): void { process.cwd() } } view { <button @click="run()">Run</button> } }`,
"WRN-CLIENT-SERVER-API",
],
[
"browser API in server function",
`component Bad { functions { server function run(): void { document.title = "bad" } } view { <div></div> } }`,
"WRN-SERVER-BROWSER-API",
],
[
"non-serializable shared state",
`global store Bad { state { values: unknown = new Map() } }`,
"WRN-STATE-NON-SERIALIZABLE",
],
[
"unknown persisted state",
`global store Bad { state { value: string = "x" } persist { storage = "local" include = ["missing"] version = 1 } }`,
"WRN-PERSIST-UNKNOWN-FIELD",
],
])("diagnoses %s", (_name, source, expectedCode) => {
expect(diagnose(source).map((diagnostic) => diagnostic.code)).toContain(expectedCode);
});
});