Skip to content

Give each test its own temporary directory#33

Merged
theinfosecguy merged 1 commit into
mainfrom
test/isolate-temp-directories
Jun 14, 2026
Merged

Give each test its own temporary directory#33
theinfosecguy merged 1 commit into
mainfrom
test/isolate-temp-directories

Conversation

@theinfosecguy

Copy link
Copy Markdown
Owner

Problem & Solution Overview

The unit and integration tests shared fixed output directories under the repo (.test-output, .test-output-*, .integration-output), so two concurrent runs (e.g. npm test alongside npm run test:coverage) could delete each other's files mid-test. Each test now creates a unique directory under the OS temp dir in beforeEach (fs.mkdtempSync) and removes only its own directory in afterEach.

Testing Done

npm test: 203 passing. npm test and npm run test:coverage run concurrently with both passing (exit 0, 203 each). No shared output directories remain under the repo.

@theinfosecguy theinfosecguy merged commit 97c6b9a into main Jun 14, 2026
5 checks passed
@theinfosecguy theinfosecguy deleted the test/isolate-temp-directories branch June 14, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant