Unify scoped development with ordinary Workspace authoring commands
This commit is contained in:
@@ -172,6 +172,27 @@ test("exact source closure recovers through explicitly selected bundles, preserv
|
||||
directory: path.join(temporary, "b"),
|
||||
});
|
||||
assert.notEqual(a.workspaceId, b.workspaceId);
|
||||
const assigned = "f8f2f8a3-328c-45a2-847a-31869ad28ce7";
|
||||
const c = await prepareDevelopmentSources({
|
||||
source: root,
|
||||
cacheDirectory: directory,
|
||||
directory: path.join(temporary, "assigned"),
|
||||
workspaceId: assigned,
|
||||
});
|
||||
assert.equal(c.workspaceId, assigned);
|
||||
assert.equal(
|
||||
JSON.parse(await readFile(path.join(c.directory, ".quixos/resource-graph.json"), "utf8")).workspaceId,
|
||||
assigned,
|
||||
);
|
||||
await assert.rejects(
|
||||
prepareDevelopmentSources({
|
||||
source: root,
|
||||
cacheDirectory: directory,
|
||||
directory: path.join(temporary, "invalid"),
|
||||
workspaceId: "not-a-workspace",
|
||||
}),
|
||||
/Workspace UUID/,
|
||||
);
|
||||
const aRoot = path.join(a.directory, "root"),
|
||||
bRoot = path.join(b.directory, "root");
|
||||
assert.equal((await exec("git", ["remote", "get-url", "origin"], { cwd: aRoot })).stdout.trim(), root.repository);
|
||||
|
||||
Reference in New Issue
Block a user