fix(browser): preserve form destinations and satisfies mutation uncertainty (#825)
Resolve empty form destinations from the captured document URL while preserving base-relative links and Chrome's form/control whitespace distinction. Follow satisfies wrappers when propagating explicit member mutation paths. Add fail-before regressions and real-browser CLI/MCP verification. Fixes #820 Assisted-by: Yukari (gensokyo-skills:yukari-boundary-analysis) Assisted-by: Kogasa (gensokyo-skills:kogasa-surprise-testing)
This commit is contained in:
@@ -115,3 +115,25 @@ describe("JavaScript semantic values for properties unaffected by a mutation", (
|
||||
).toBe("unknown");
|
||||
});
|
||||
});
|
||||
|
||||
describe("property mutations through TypeScript satisfies aliases", () => {
|
||||
it.each([
|
||||
'const shared = { mode: "initial" }; const alias = shared satisfies { mode: string }; alias.mode = "updated"; return shared.mode;',
|
||||
'const shared = { nested: { mode: "initial" } }; const alias = shared satisfies { nested: { mode: string } }; alias.nested.mode = "updated"; return shared.nested.mode;',
|
||||
'const shared = { mode: "initial" }; const alias = (shared satisfies { mode: string }) as { mode: string }; delete alias.mode; return shared.mode;',
|
||||
"const shared = [1]; const alias = shared satisfies number[]; alias[0]++; return shared[0];",
|
||||
])("keeps the mutated value unknown: %s", (body) => {
|
||||
expect(resultValue(body)?.status).toBe("unknown");
|
||||
});
|
||||
|
||||
it("retains the untouched property through a satisfies alias", () => {
|
||||
expect(
|
||||
resultValue(`
|
||||
const shared = { mode: "initial", token: "TOKEN" };
|
||||
const alias = shared satisfies { mode: string; token: string };
|
||||
alias.mode = "updated";
|
||||
return shared.token;
|
||||
`),
|
||||
).toEqual({ status: "literal", value: "TOKEN" });
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user