Skip to content

Commit ddc0b01

Browse files
committed
test(transformer): rename babel-plugin-proposal-explicit-resource-management test directory (#12894)
Fixes missing test cases for explicit resource management by renaming the test directory to match the updated plugin name. ## Background PR #12874 updated references from the deprecated `@babel/plugin-proposal-explicit-resource-management` to the newer `@babel/plugin-transform-explicit-resource-management` package. However, the test directory under `tasks/transform_conformance/tests/` was not renamed, causing the test runner to miss 4 test cases. ## Issue The transform conformance test runner iterates through plugins defined in `constants.rs` and looks for test fixtures in directories matching the plugin names. Since the plugin name was updated to `babel-plugin-transform-explicit-resource-management` but the directory remained `babel-plugin-proposal-explicit-resource-management`, the test runner couldn't find the test cases. This resulted in 4 missing test cases in the `oxc.snap` file as noted by @Dunqing. ## Solution Renamed the test directory: ``` tasks/transform_conformance/tests/babel-plugin-proposal-explicit-resource-management/ → tasks/transform_conformance/tests/babel-plugin-transform-explicit-resource-management/ ``` ## Verification After the fix, running the transform conformance tests now correctly discovers and executes all 4 test cases: - export-class-name - for-of-no-block - function-with-scopes-in-params - try-catch The `oxc.snap` file now shows `babel-plugin-transform-explicit-resource-management (2/4)` indicating all 4 test cases are found (2 pass, 2 have implementation issues unrelated to this fix). Closes the follow-up issue identified in #12874. <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/oxc-project/oxc/issues/new?title=✨Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.
1 parent 9c5a377 commit ddc0b01

File tree

13 files changed

+20
-1
lines changed

13 files changed

+20
-1
lines changed

tasks/transform_conformance/snapshots/oxc.snap.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
commit: 98d18aa4
22

3-
Passed: 180/298
3+
Passed: 182/302
44

55
# All Passed:
66
* babel-plugin-transform-class-static-block
@@ -20,6 +20,25 @@ Passed: 180/298
2020
* regexp
2121

2222

23+
# babel-plugin-transform-explicit-resource-management (2/4)
24+
* export-class-name/input.js
25+
x Output mismatch
26+
27+
* function-with-scopes-in-params/input.js
28+
Bindings mismatch:
29+
after transform: ScopeId(1): ["_usingCtx", "a", "b", "x", "y"]
30+
rebuilt : ScopeId(1): ["_usingCtx", "a", "b"]
31+
Bindings mismatch:
32+
after transform: ScopeId(5): []
33+
rebuilt : ScopeId(4): ["x", "y"]
34+
Symbol scope ID mismatch for "x":
35+
after transform: SymbolId(3): ScopeId(1)
36+
rebuilt : SymbolId(4): ScopeId(4)
37+
Symbol scope ID mismatch for "y":
38+
after transform: SymbolId(4): ScopeId(1)
39+
rebuilt : SymbolId(5): ScopeId(4)
40+
41+
2342
# babel-plugin-transform-class-properties (23/29)
2443
* private-field-resolve-to-method/input.js
2544
x Output mismatch

0 commit comments

Comments
 (0)