test(es/minifier): move issue_11835 fixture out of terser folder#11840
test(es/minifier): move issue_11835 fixture out of terser folder#11840
Conversation
Per review feedback, relocate the issue_11835 regression case from tests/terser/compress/sequences/issue_11835 to tests/fixture/issues/11835, where SWC's own (non-Terser-imported) issue fixtures live. Drop the terser-specific output.mangleOnly.js and expected.stdout artifacts. Co-authored-by: Donny/강동윤 <kdy1@users.noreply.github.com>
|
|
|
ReviewThis is a straightforward, well-scoped follow-up to #11837. The relocation matches existing conventions and the deletions are correct. Verification
Minor observations (not blocking)
LGTM — purely test-layout cleanup with no behavior change. ✅ |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 56e389a338
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @@ -1 +0,0 @@ | |||
| 3 | |||
There was a problem hiding this comment.
Preserve runtime-output assertion for issue_11835
Deleting expected.stdout while relocating this case out of tests/terser/compress/** drops its execution-based semantic check: custom_fixture only compares output.js text/AST and never runs the optimized code, whereas terser_exec explicitly executes and asserts stdout (tests/terser_exec.rs, fixture at lines 41-43 and assertion flow at 93-147). As a result, this regression test no longer verifies the runtime behavior that the original fixture guarded (printing 3), so semantic regressions for this pattern can slip through.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Pull request overview
Relocates the issue_11835 minifier regression fixture from the Terser-imported test suite into SWC’s native tests/fixture/issues area, aligning it with the project’s organization for SWC-owned issue regressions.
Changes:
- Removed the old
tests/terser/.../issue_11835expected artifacts (including Terser-specificoutput.mangleOnly.jsandexpected.stdout). - Added a new SWC-native fixture under
tests/fixture/issues/11835withinput.js,output.js, and a targetedconfig.json.
Reviewed changes
Copilot reviewed 2 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| crates/swc_ecma_minifier/tests/terser/compress/sequences/issue_11835/output.mangleOnly.js | Removes the Terser-specific mangle-only output artifact for this case. |
| crates/swc_ecma_minifier/tests/terser/compress/sequences/issue_11835/expected.stdout | Removes runtime stdout expectation from the Terser fixture location. |
| crates/swc_ecma_minifier/tests/fixture/issues/11835/input.js | Adds SWC-native regression input reproducing the sequence-order side-effect scenario. |
| crates/swc_ecma_minifier/tests/fixture/issues/11835/output.js | Adds the expected SWC minifier output ensuring other() remains ordered before pos = 1 in the for init sequence. |
| crates/swc_ecma_minifier/tests/fixture/issues/11835/config.json | Adds a focused config enabling the relevant optimizations (collapse_vars, sequences). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Binary Sizes
Commit: eaa851d |
Merging this PR will not alter performance
Comparing Footnotes
|
Per review feedback on #11837, relocate the issue_11835 regression case from
tests/terser/compress/sequences/issue_11835totests/fixture/issues/11835, where SWC's own (non-Terser-imported) issue fixtures live. Drop the terser-specificoutput.mangleOnly.jsandexpected.stdoutartifacts.Follow-up to #11837.
Generated with Claude Code