Make Camino examples and scaffolds complete Yarn and Nix packages
This commit is contained in:
@@ -61,4 +61,28 @@ test("structural plans validate the graph, journal originals, and reject stale e
|
||||
await applyStructure(draft);
|
||||
assert.match(await fs.readFile(path.join(root, "workspace.qx"), "utf8"), /import interface NotImplementedYet/);
|
||||
await assert.rejects(() => planStructure(root, { ...provisional, validation: "resource-graph" }));
|
||||
const plugin = ".yarn/plugins/yarn-plugin-nixify.cjs";
|
||||
await applyStructure(
|
||||
await planStructure(root, {
|
||||
kind: "workspace",
|
||||
validation: "syntax",
|
||||
files: [
|
||||
{ file: plugin, create: "module.exports = {};\n" },
|
||||
{ file: "yarn.lock", create: "__metadata:\n version: 8\n" },
|
||||
{ file: "flake.lock", create: '{"version":7}\n' },
|
||||
],
|
||||
}),
|
||||
);
|
||||
assert.equal(await fs.readFile(path.join(root, plugin), "utf8"), "module.exports = {};\n");
|
||||
for (const file of [".yarn/../escape.cjs", ".yarn/cache/entry.cjs", ".git/hooks/hook.cjs"]) {
|
||||
await assert.rejects(
|
||||
() =>
|
||||
planStructure(root, {
|
||||
kind: "workspace",
|
||||
validation: "syntax",
|
||||
files: [{ file, create: "" }],
|
||||
}),
|
||||
/Unsafe scaffold path/,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user