aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoramankumarsingh77 <amankumarsingh7702@gmail.com>2026-07-27 00:19:46 +0530
committerAman Kumar <145339995+amankumarsingh77@users.noreply.github.com>2026-08-02 19:12:46 +0530
commitce5d808cb4cc3581d85b829656d1d478dc43e3a6 (patch)
treecc45941b44977c908a631d40ebcce16df4da1d8e
parent3607b5523f9d23ec6b9facf8474c7bdf047537e1 (diff)
fix(test): split P5/P6/P10 into one node:test per original check() label
Task 1 review found three ported checks collapsed two original labels into one test(), losing the per-assertion granularity the brief's Step 7 requires. Splits P5, P6, and P10 back into two test() blocks each, using the original labels verbatim, with each block doing its own dynamic import after before() sets PI_CODING_AGENT_DIR. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
-rw-r--r--test/profile/store-test.ts17
1 files changed, 14 insertions, 3 deletions
diff --git a/test/profile/store-test.ts b/test/profile/store-test.ts
index 7d38d34..8b0d85c 100644
--- a/test/profile/store-test.ts
+++ b/test/profile/store-test.ts
@@ -60,13 +60,20 @@ describe("profile pin store", () => {
await writePin({ ...pin, profileDir: "Default", label: "Work (work@example.com)" });
const read = await readPin();
assert.equal(read?.profileDir, "Default");
+ });
+
+ test("P5: one pin file on disk", () => {
assert.equal(readdirSync(sandbox).filter((f) => f === "browser-harness.json").length, 1);
});
- test("P6: clear succeeds and cleared pin reads as none", async () => {
- const { readPin, clearPin } = await import("../../src/profile/store");
+ test("P6: clear succeeds", async () => {
+ const { clearPin } = await import("../../src/profile/store");
const cleared = await clearPin();
assert.equal(cleared.success, true);
+ });
+
+ test("P6: cleared pin reads as none", async () => {
+ const { readPin } = await import("../../src/profile/store");
assert.equal(await readPin(), null);
});
@@ -92,10 +99,14 @@ describe("profile pin store", () => {
});
test("P10: write recreates a missing agent dir", async () => {
- const { readPin, writePin } = await import("../../src/profile/store");
+ const { writePin } = await import("../../src/profile/store");
rmSync(sandbox, { recursive: true, force: true });
const written = await writePin(pin);
assert.equal(written.success, true);
+ });
+
+ test("P10: pin readable after dir recreation", async () => {
+ const { readPin } = await import("../../src/profile/store");
assert.equal((await readPin())?.profileDir, "Profile 1");
});