diff --git a/packages/cultmesh-ts/test/cultmesh.test.ts b/packages/cultmesh-ts/test/cultmesh.test.ts index d2935da8..b6fee823 100644 --- a/packages/cultmesh-ts/test/cultmesh.test.ts +++ b/packages/cultmesh-ts/test/cultmesh.test.ts @@ -24,6 +24,8 @@ const noteDocument = defineDocumentType({ name: "noteId", }); +type Note = z.infer; + // Another type claiming noteDocument's schema. It is never registered beside noteDocument: one type owns a schema. const otherTypeForNoteSchema = defineDocumentType({ type: "cultmesh.note.ui", @@ -133,7 +135,7 @@ test("CultMesh TS document handles hide local cache plumbing behind typed reacti body: "catalog-updated", }); assert.equal( - (await catalog.latest(noteDocument, "browser-client")).body, + (await catalog.latest(noteDocument, "browser-client")).body, "catalog-updated", ); // A typed lookup is answered by its own type's handle; a handle of another type for the same schema is not it. @@ -939,7 +941,7 @@ test("CultMesh TS binds publication document catalogs from source resolvers", as ["daemon:first", "daemon:second"], ); assert.equal( - (await catalog.document(noteDocument).latest()).body, + (await catalog.document(noteDocument).latest()).body, "second source", ); assert.equal(catalog.document(noteDocument).routeHint.description, "publication catalog"); @@ -1115,7 +1117,7 @@ test("CultMesh TS collection handles expose typed snapshots and reset watches", const catalog = CultMesh.collections(collection); assert.deepEqual( - (await catalog.latest(noteDocument, "local")).map(note => note.body).sort(), + (await catalog.latest(noteDocument, "local")).map(note => note.body).sort(), ["alpha", "bravo"], ); // A typed lookup is answered by its own type's handle; a handle of another type for the same schema is not it.