Skip to content

Commit

Permalink
Merge branch 'main' into num-sep
Browse files Browse the repository at this point in the history
  • Loading branch information
rzvxa authored Mar 25, 2024
2 parents 934135c + 68e011c commit 86eb172
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions tasks/transform_conformance/src/test_case.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,7 @@ impl TestCase for ConformanceTestCase {
if let Some(throws) = &babel_options.throws {
return throws.to_string();
}
// The transformation should be equal to input.js If output.js does not exist.
let program = Parser::new(&allocator, &input, source_type).parse().program;
Codegen::<false>::new("", &input, codegen_options.clone())
.build(&program)
.source_text
String::default()
},
|output| {
// Get expected code by parsing the source text, so we can get the same code generated result.
Expand All @@ -285,7 +281,8 @@ impl TestCase for ConformanceTestCase {
},
);

let passed = transformed_code == output || actual_errors.contains(&output);
let passed =
transformed_code == output || (!output.is_empty() && actual_errors.contains(&output));
if filtered {
println!("Input:\n");
println!("{input}\n");
Expand Down

0 comments on commit 86eb172

Please sign in to comment.