Test: a string-named store read is typed as a note in the assertion

The handle named by a bare schema id yields unknown; 3c9 test code read .body
off it and did not compile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-30 20:20:54 +02:00
commit 92d9e13868

View file

@ -392,7 +392,7 @@ test("CultMesh TS store document handles read only records under an id their def
compatibleSchemaIds: ["cultmesh.note.v0"],
schema: noteDocument.schema,
});
assert.equal((await CultMesh.documentFromStore(storeOf(foreign, own), "cultmesh.note.v0").latest()).body, "own id");
assert.equal(((await CultMesh.documentFromStore(storeOf(foreign, own), "cultmesh.note.v0").latest()) as Note).body, "own id");
assert.equal((await CultMesh.documentFromStore(storeOf(foreign, own), renamed).latest()).body, "own id");
await assert.rejects(CultMesh.documentFromStore(storeOf(foreign), renamed).latest(), /did not contain schema/);
// A record under the definition's own id wins over one under an id it lists, wherever each sits in the store.