This commit is contained in:
@@ -265,6 +265,30 @@ test("installer writes empty option skeletons, fills only missing keys, and is i
|
||||
expect(await contents(f.config)).toEqual(filled);
|
||||
});
|
||||
|
||||
test("agents installs set experimental.subagent_depth to at least 2", async () => {
|
||||
const f = await fixture();
|
||||
await install(f.source, f.config, "quota");
|
||||
expect((await contents(f.config)).experimental).toBeUndefined();
|
||||
await install(f.source, f.config, "agents");
|
||||
const fresh = await contents(f.config);
|
||||
expect(fresh.experimental).toEqual({ subagent_depth: 2 });
|
||||
expect(fresh).toMatchObject(unrelated);
|
||||
for (const [depth, expected] of [
|
||||
[1, 2],
|
||||
[3, 3],
|
||||
]) {
|
||||
await writeFile(
|
||||
join(f.config, "opencode.json"),
|
||||
JSON.stringify({ ...fresh, experimental: { subagent_depth: depth, other: true } }),
|
||||
);
|
||||
await install(f.source, f.config);
|
||||
const result = await contents(f.config);
|
||||
expect(result.experimental).toEqual({ subagent_depth: expected, other: true });
|
||||
await install(f.source, f.config);
|
||||
expect(await contents(f.config)).toEqual(result);
|
||||
}
|
||||
});
|
||||
|
||||
test("local installer retains executable permissions and supports direct invocation", async () => {
|
||||
const f = await fixture();
|
||||
const path = new URL("../install-local.sh", import.meta.url).pathname;
|
||||
|
||||
Reference in New Issue
Block a user