Evaluate coherent local queries over explicit replica scopes
This commit is contained in:
@@ -3,13 +3,13 @@ import { test } from "node:test";
|
||||
import { compileQuery } from "../src/query/compile.js";
|
||||
import { linkQueries } from "../src/query/link.js";
|
||||
import { loadReaderWorkspace as load, readReaderFixture as read } from "./reader-fixture.js";
|
||||
test("complete reader contracts compose factories, portable selectors, CRDT edits, and six query scopes", async () => {
|
||||
test("complete reader contracts compose factories, portable selectors, CRDT edits, and bounded query scopes", async () => {
|
||||
const workspace = await load();
|
||||
assert.equal(workspace.constructors.length, 0);
|
||||
assert.equal(workspace.atoms.length, 3);
|
||||
const linked = linkQueries(workspace);
|
||||
assert.equal(linked.length, 7);
|
||||
assert.equal(linked.filter((q) => q.checked.declaration.placement?.kind === "local").length, 3);
|
||||
assert.equal(linked.length, 8);
|
||||
assert.equal(linked.filter((q) => q.checked.declaration.placement?.kind === "local").length, 4);
|
||||
const screen = linked.find((q) => q.checked.declaration.displayName === "ReaderScreen")!;
|
||||
assert.ok(screen.fields.some((f) => f.memberId === "highlight:excerpt" && f.binding.kind === "package"));
|
||||
assert.ok(screen.fields.some((f) => f.memberId === "comment:content" && f.binding.kind === "state"));
|
||||
|
||||
Reference in New Issue
Block a user