Skip to content

testing: remove the temp profile dir on close; pythonEnv tests clean up - #2

Open
TheDrOnos wants to merge 1 commit into
directelectron:mainfrom
TheDrOnos:fix/temp-dir-cleanup
Open

TheDrOnos wants to merge 1 commit into
directelectron:mainfrom
TheDrOnos:fix/temp-dir-cleanup

Conversation

@TheDrOnos

@TheDrOnos TheDrOnos commented Sep 12, 2026

Copy link
Copy Markdown

Closes #1.

launchApp made the --user-data-dir with mkdtempSync inline and never kept the path, so nothing could remove it and every e2e launch left a <appId>-e2e-profile-* directory behind. closeApp now takes profileDir and removes it once the process is down, on the closed, killed and no-app paths alike; launchApp passes its own and reports it. pythonEnv.test.ts tracks the uv-stub-* / uv-none-* directories it makes and removes them in an after() hook.

Verified: npm run typecheck clean, npm run test:unit 91/91 (three new closeApp cases). The unit suite left 16 directories per run on main, 0 here. Two real Electron launches through the patched harness (a downstream app's e2e, Windows) left 0 profile directories, was 1 per launch.

launchApp made the --user-data-dir with mkdtempSync inline and never kept
the path, so nothing could remove it and every e2e launch left a
<appId>-e2e-profile-* directory behind. closeApp now takes profileDir and
removes it once the process is down, on the closed, killed and no-app
paths alike; launchApp passes its own and reports it. pythonEnv.test.ts
tracks the uv-stub-*/uv-none-* directories it makes and removes them in
an after() hook.
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.

testing harness and pythonEnv test leave temp directories behind

1 participant