feat(javascript): report observed export property presence (#1160)
* feat(javascript): report observed export property presence Extend compare_javascript_export_shapes so each retained return variant lists observed property names and each change reports presence independently of value resolution. Complete parent coverage classifies one-sided names as added or removed even when static values stay unknown. Fixes #725 * test(javascript): match unknown export-shape values by availability Nested availability objects include a reason when values stay unresolved. Assert availability through objectContaining so presence-only added and removed rows still verify unknown values. * fix(javascript): preserve uncertain export property presence and locations * fix(javascript): normalize presence and preserve local property coverage * fix(javascript): require present discriminants for return pairing * fix(javascript): normalize retained shapes before comparison * refactor(javascript): share return projection with executable examples * fix(javascript): localize uncertainty for missing mutated slots * fix(javascript): bind advertised export examples to exact artifacts * fix(javascript): keep uncertain property flow as candidates --------- Co-authored-by: morluto <76467478+morluto@users.noreply.github.com>
This commit is contained in:
@@ -63,9 +63,17 @@ it("invalidates a deep mutation while retaining unrelated literal properties", (
|
||||
status: "object",
|
||||
properties: [
|
||||
{ name: "untouched", value: { status: "literal", value: "retained" } },
|
||||
{
|
||||
name: "next",
|
||||
presence: "unknown-coverage",
|
||||
value: {
|
||||
status: "unknown",
|
||||
reason: "This property may have been mutated.",
|
||||
},
|
||||
},
|
||||
],
|
||||
unknownProperties: true,
|
||||
omittedProperties: null,
|
||||
unknownProperties: false,
|
||||
omittedProperties: 0,
|
||||
});
|
||||
expect(onlyBinding(ir, "value").value).toEqual({
|
||||
status: "literal",
|
||||
|
||||
Reference in New Issue
Block a user