Skip to content

test(node): Ensure runner does not create unused tmp files #17392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 12, 2025

Conversation

mydea
Copy link
Member

@mydea mydea commented Aug 12, 2025

Noticed locally that I sometimes got unexpected un-removed tmp_xxx dirs in node-integration tests. After some debugging, I figured out the reason: We clean the tmp dir up in afterAll of the test. However, if all tests inside are skipped, afterAll is not executed. So if you run tests in a filtered way - e.g. yarn test -t "xxx" - it would create the tmp dirs, but not delete them.

This PR fixes this by moving the creation of the tmp dir into beforeAll, which equally is not executed when all tests are skipped.

@mydea mydea self-assigned this Aug 12, 2025
Copy link
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 24.16 kB added added
@sentry/browser - with treeshaking flags 22.73 kB added added
@sentry/browser (incl. Tracing) 39.87 kB added added
@sentry/browser (incl. Tracing, Replay) 77.99 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 67.83 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 82.69 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 94.79 kB added added
@sentry/browser (incl. Feedback) 40.83 kB added added
@sentry/browser (incl. sendFeedback) 28.81 kB added added
@sentry/browser (incl. FeedbackAsync) 33.7 kB added added
@sentry/react 25.88 kB added added
@sentry/react (incl. Tracing) 41.86 kB added added
@sentry/vue 28.64 kB added added
@sentry/vue (incl. Tracing) 41.69 kB added added
@sentry/svelte 24.18 kB added added
CDN Bundle 25.66 kB added added
CDN Bundle (incl. Tracing) 39.76 kB added added
CDN Bundle (incl. Tracing, Replay) 75.82 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 81.27 kB added added
CDN Bundle - uncompressed 74.96 kB added added
CDN Bundle (incl. Tracing) - uncompressed 117.59 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 231.88 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 244.48 kB added added
@sentry/nextjs (client) 43.89 kB added added
@sentry/sveltekit (client) 40.32 kB added added
@sentry/node-core 47.99 kB added added
@sentry/node 147.02 kB added added
@sentry/node - without tracing 92.24 kB added added
@sentry/aws-serverless 103.67 kB added added

Copy link
Member

@RulaKhaled RulaKhaled left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@mydea mydea merged commit 278496a into develop Aug 12, 2025
40 checks passed
@mydea mydea deleted the fn/better-node-runner-cleanup branch August 12, 2025 14:32
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.

2 participants