Skip to content

Commit

Permalink
chore: add test results
Browse files Browse the repository at this point in the history
  • Loading branch information
magic-akari committed Oct 7, 2023
1 parent cf7fe6f commit 5248126
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions crates/oxc_transformer/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ pub struct TransformOptions {
/// See <https://www.typescriptlang.org/tsconfig#target>
#[derive(Debug, Default, Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
pub enum TransformTarget {
ES5,
ES2015,
ES2016,
ES2019,
Expand Down
11 changes: 10 additions & 1 deletion tasks/transform_conformance/babel.snap.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Passed: 86/1071
Passed: 91/1078

# babel-plugin-transform-class-properties
* Failed: assumption-constantSuper/complex-super-class/input.js
Expand Down Expand Up @@ -750,6 +750,15 @@ Passed: 86/1071
* Failed: regression/4403/input.js
* Passed: exponentiation-operator/binary/input.js

# babel-plugin-transform-shorthand-properties
* Failed: shorthand-properties/method-type-annotations/input.js
* Failed: shorthand-properties/shorthand-comments/input.js
* Passed: shorthand-properties/method-plain/input.js
* Passed: shorthand-properties/proto/input.js
* Passed: shorthand-properties/shorthand-mixed/input.js
* Passed: shorthand-properties/shorthand-multiple/input.js
* Passed: shorthand-properties/shorthand-single/input.js

# babel-plugin-transform-typescript
* Failed: class/abstract-class-decorated/input.ts
* Failed: class/abstract-class-decorated-method/input.ts
Expand Down
6 changes: 4 additions & 2 deletions tasks/transform_conformance/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ pub fn babel(options: &BabelOptions) {
"babel-plugin-transform-async-to-generator",
// ES2016
"babel-plugin-transform-exponentiation-operator",
// ES2015
"babel-plugin-transform-shorthand-properties",
// TypeScript
"babel-plugin-transform-typescript",
// React
Expand Down Expand Up @@ -133,7 +135,7 @@ fn babel_test(input_path: &Path, options: &BabelOptions) -> bool {
let expected = output_path.and_then(|path| fs::read_to_string(path).ok());
if let Some(expected) = &expected {
let transform_options = TransformOptions {
target: TransformTarget::ES2015,
target: TransformTarget::ES5,
react: Some(TransformReactOptions::default()),
};
let program = allocator.alloc(ret.program);
Expand All @@ -146,7 +148,7 @@ fn babel_test(input_path: &Path, options: &BabelOptions) -> bool {
let passed = trim_transformed == trim_expected;
if filtered {
println!("Expected:\n");
println!("{expected:?}\n");
println!("{expected}\n");
println!("Transformed:\n");
println!("{transformed}\n");
println!("Diff:\n");
Expand Down

0 comments on commit 5248126

Please sign in to comment.