Skip to content

[plugin installer] Change tests to not store files in the application directory #6512

@BigFunger

Description

@BigFunger

Suggestions from PR #6402

@epixa Not a big deal, but it'd probably be better to dump this sort of stuff into the operating system tmp directory rather than writing to the project itself. The tmp module is awesome for this as it'll automatically clean up when the process is killed, which means if the tests were killed while they were running, there wouldn't be leftover artifacts.

If you do end up keeping the mkdirp/current directory approach, please add this path to the .gitignore for when the tests are killed.

Actually, you're probably better off just circumventing the actual file system in your tests altogether. Something like mock-fs would allow you to mock away the file system entirely, which means the tests would run a lot faster and you would never run into issues with orphaned artifacts and the like.

tmp module
mock-fs module

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions