GeezerVison is showing github.com — pm-dispatch validate.test.ts: 'fixture cleanup' test deletes its fixture and asserts nothing · Issue #12670 · developing-today/code
pm-dispatch validate.test.ts: 'fixture cleanup' test deletes its fixture and asserts nothing #12670DescriptionFinding
In pm-stack/dispatch/test/validate.test.ts, the fixture directory is removed inside a test that asserts nothing.
-
:438 creates base with mkdtempSync(join(tmpdir(), "dispatch-3999-")) inside describe("session directory symlink confinement (issue #3999)") (:429).
-
:516-518:
test("fixture cleanup", () => {
rmSync(base, { recursive: true, force: true });
expect(true).toBe(true);
});
-
The file has no afterAll or afterEach (grep -n afterAll returns nothing).
Why it matters
- Order-dependent: the temp directory is removed only when this test runs. A filtered run (
bun test -t <name>), a shard, or a -bail stop skips it and leaks a dispatch-3999-* directory in tmpdir.
- No signal:
expect(true).toBe(true) always passes, so the test reports a pass even if the removal failed.
- Low severity, but it is the kind of test-quality drift the testing doctrine (
doc/agents/testing-doctrine.md) asks us to avoid.
Suggested fix shape
Move the rmSync into an afterAll in that describe block and delete the fixture cleanup test. If the teardown must be checked, assert existsSync(base) === false in afterAll or in a dedicated test. Activitydeveloping-today commented on Nov 22, 2026 dezren39 commented on Nov 23, 2026
Done-check — Lane KV (archer), 2026-11-23. This issue's premise no longer holds on current main; the fix landed before this pickup:
- Commit
99008f9427 "pm-dispatch: tear down the symlink-confinement fixture in afterAll", merged via PR pm-dispatch: tear down the symlink-confinement fixture in afterAll #12676 at 2026-11-22T20:47:28Z (~25 minutes after this issue was filed).
- Verified first-hand on current main:
pm-stack/dispatch/test/validate.test.ts imports afterAll (line 1) and the session directory symlink confinement (issue #3999) describe block tears the fixture down in afterAll (line 444: rmSync(base, { recursive: true, force: true })).
- The
fixture cleanup test that asserted nothing is gone — grep "fixture cleanup" over the file on main returns no match.
Closing as completed.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|