Skip to content

fix(test): onboard-session lock tests share tmpDir causing order dependence #1284

@ericksoa

Description

@ericksoa

Bug

In src/lib/onboard-session.test.ts, all lock tests share a single tmpDir. releaseOnboardLock() can leave malformed lock files behind, and the beforeEach hook only clears the module cache and session file — not the lock artifacts. This makes lock tests order-dependent.

Fix

Recreate tmpDir in beforeEach (or fs.rmSync + fs.mkdirSync) so each test starts clean.

Found by

CodeRabbit review on #1272. Pre-existing from original JS.

Metadata

Metadata

Assignees

Labels

area: cliCommand line interface, flags, terminal UX, or outputarea: e2eEnd-to-end tests, nightly failures, or validation infrastructure
No fields configured for Enhancement.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions