test: refactor bundler_promiseall_deadcode to use itBundled helper - #23370
Conversation
Modernizes the test to use the itBundled test helper instead of manual temp directory creation and spawning. This makes the test more concise and consistent with other bundler tests. Changes: - Replace tempDirWithFiles + manual Bun.spawn with itBundled - Use files object for test fixtures - Use onAfterBundle callback for bundled output assertions - Use run.validate for runtime stderr checks - Use run.partialStdout for stdout verification - Preserve all original test assertions and behavior All 3 tests pass with identical functional behavior. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Updated 4:41 AM PT - Oct 8th, 2025
❌ Your commit
🧪 To try this PR locally: bunx bun-pr 23370That installs a local version of the PR into your bun-23370 --bun |
WalkthroughRewrites Changes
Possibly related PRs
Suggested reviewers
Pre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (1 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: ASSERTIVE Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (6)test/**📄 CodeRabbit inference engine (.cursor/rules/writing-tests.mdc)
Files:
test/bundler/**/*📄 CodeRabbit inference engine (.cursor/rules/writing-tests.mdc)
Files:
test/**/*.{js,ts}📄 CodeRabbit inference engine (.cursor/rules/writing-tests.mdc)
Files:
test/**/*.test.ts📄 CodeRabbit inference engine (test/CLAUDE.md)
Files:
test/**/*.test.{ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
test/bundler/**📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (7)📓 Common learnings📚 Learning: 2025-08-30T00:09:39.100ZApplied to files:
📚 Learning: 2025-10-04T09:51:30.294ZApplied to files:
📚 Learning: 2025-09-03T17:10:13.486ZApplied to files:
📚 Learning: 2025-10-04T09:51:30.294ZApplied to files:
📚 Learning: 2025-08-30T00:12:56.803ZApplied to files:
📚 Learning: 2025-08-30T00:09:39.100ZApplied to files:
🧬 Code graph analysis (1)test/bundler/bundler_promiseall_deadcode.test.ts (1)
Comment |
Summary
Modernizes
test/bundler/bundler_promiseall_deadcode.test.tsto use theitBundledtest helper instead of manual temp directory creation and spawning. This makes the test more concise, maintainable, and consistent with other bundler tests.Changes
tempDirWithFiles+ manualBun.spawnwithitBundledfilesobject for test fixtures instead of creating a temp directoryonAfterBundlecallback for bundled output assertionsrun.validatefor runtime stderr validationrun.partialStdoutfor stdout verificationTest Results
All 3 tests pass with identical functional behavior:
Verification
All original assertions are preserved:
__esmand__promiseAllpresence/absence checksThe test is now more concise (407 insertions vs 514 deletions) while maintaining full test coverage.
🤖 Generated with Claude Code