Implement rule-based Studio creation, usable canvas and Reader, and consolidated package authoring
This commit is contained in:
@@ -63,7 +63,7 @@ test("checked component scaffolding composes with execution handlers without rep
|
||||
assert.equal(await fs.readFile(flake, "utf8"), retainedFlake);
|
||||
assert.match(await fs.readFile(entriesFile, "utf8"), /retained entry comment/);
|
||||
assert.match(await fs.readFile(path.join(root, "src/server.ts"), "utf8"), /echo/);
|
||||
assert.match(await fs.readFile(path.join(root, "flake.nix"), "utf8"), /import \.\/package\.nix/);
|
||||
assert.match(await fs.readFile(path.join(root, "flake.nix"), "utf8"), /mkCaminoReactPackage/);
|
||||
await assert.rejects(
|
||||
apply("component", {
|
||||
name: "Card",
|
||||
|
||||
@@ -47,7 +47,7 @@ test("execution scaffolds route typed handlers by declared effect and target wit
|
||||
assert.match(await read("src/impl/asyncWork.ts"), /RemoteImplementation/);
|
||||
assert.match(await read("src/impl/both.ts"), /PortableImplementation/);
|
||||
assert.match(await read("flake.nix"), /checkedArtifacts/);
|
||||
assert.match(await read("package.nix"), /entries.browser/);
|
||||
assert.match(await read("flake.nix"), /entries.browser/);
|
||||
await assert.rejects(add("both", "transaction targets [browser, server]"), /unique/);
|
||||
await assert.rejects(add("invalid", "snapshot targets [remote]"), /browser\/server/);
|
||||
await assert.rejects(apply("function", { name: "missing", id: "export:missing" }), /explicit execution/);
|
||||
|
||||
@@ -101,3 +101,17 @@ test("conformance enrollment, major edits, imports, and private attachment remov
|
||||
const imported = editStructure(removed, { operation: "import", kind: "interface", name: "Playable" });
|
||||
assert.equal(editStructure(imported, { operation: "import", kind: "interface", name: "Playable" }), imported);
|
||||
});
|
||||
|
||||
test("enrolling a generic conformance or rule places its identity after target arguments", () => {
|
||||
for (const source of [
|
||||
"fragment { conform Game as View<atom Game> {} }",
|
||||
"fragment { conform<object T> Source<T> as View<T> {} }",
|
||||
]) {
|
||||
const enrolled = editStructure(source, {
|
||||
operation: "conformance-id",
|
||||
target: { kind: "conformanceDecl" },
|
||||
id: "rule:view",
|
||||
});
|
||||
assert.match(enrolled, /as View<[^>]+> id "rule:view"/);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user