Build and activate checked component packages through normal source authoring (WI-12)
This commit is contained in:
@@ -84,3 +84,21 @@ test("explicit budgets can exceed defaults without exceeding wire bounds", () =>
|
||||
assert.equal(result.resource.revision.queries![0]!.budgets.rows, 5000);
|
||||
assert.equal(compile("4294967296").ok, false);
|
||||
});
|
||||
|
||||
test("query identity follows public contracts, not source retention commits", async () => {
|
||||
const document = async () => "query Rows {root {objects(first:10) {entries {node {range {start}}}}}}";
|
||||
const before = await compileQuery(declaration, [iface], document);
|
||||
const retained = {
|
||||
...iface,
|
||||
source: { ...iface.source, repository: "https://other.test/interfaces.git", commit: "b".repeat(40) },
|
||||
};
|
||||
assert.equal((await compileQuery(declaration, [retained], document)).definitionDigest, before.definitionDigest);
|
||||
const changed = structuredClone(retained);
|
||||
changed.members[0]!.operations[0]!.id = "changed:get" as (typeof changed.members)[0]["operations"][0]["id"];
|
||||
assert.notEqual((await compileQuery(declaration, [changed], document)).definitionDigest, before.definitionDigest);
|
||||
assert.notEqual(
|
||||
(await compileQuery({ ...declaration, budgets: { ...declaration.budgets, rows: 17 } }, [retained], document))
|
||||
.definitionDigest,
|
||||
before.definitionDigest,
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user