Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tasks/transforme_conformance): support for testing oxc's test ca…
…ses (#2835) Related to: #2822 (comment) Although `babel` has a lot of test cases, we still need to add edge cases that `babel` doesn't have. This PR will allow us to add out test cases to `/root/oxc/tasks/transform_conformance/tests`. The directory structure is consistent with `babel` For example ```shell # cd /root/oxc/tasks/transform_conformance/tests - babel-transform-plugin–optional-catch-binding - test - fixtures - your tests # add test cases here ```
- Loading branch information
Showing
6 changed files
with
53 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Passed: 0/1 | ||
|
||
# All Passed: | ||
|
||
|
||
|
||
# babel-plugin-transform-optional-catch-binding (0/1) | ||
* try-catch-shadow/input.js | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Passed: 0/0 | ||
|
||
# All Passed: | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...onformance/tests/babel-plugin-transform-optional-catch-binding/test/fixtures/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"plugins": ["transform-optional-catch-binding"] | ||
} |
6 changes: 6 additions & 0 deletions
6
...sts/babel-plugin-transform-optional-catch-binding/test/fixtures/try-catch-shadow/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const _unused = "It's a lie, They gonna use me:("; | ||
try { | ||
throw 0; | ||
} catch { | ||
console.log(_unused); | ||
} |
6 changes: 6 additions & 0 deletions
6
...ts/babel-plugin-transform-optional-catch-binding/test/fixtures/try-catch-shadow/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const _unused = "It's a lie, They gonna use me:("; | ||
try { | ||
throw 0; | ||
} catch (_unused2) { | ||
console.log(_unused); | ||
} |