Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(es/testing): Make test_inline! not read output as a file #8569

Merged
merged 2 commits into from
Jan 29, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions crates/swc_ecma_transforms_testing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,12 +361,10 @@ where
{
let _logger = testing::init();

let expected = read_to_string(output);
let _is_really_expected = expected.is_ok();
let expected = expected.unwrap_or_default();
let expected = output;

let expected_src = Tester::run(|tester| {
let expected_module = tester.apply_transform(noop(), "expected.js", syntax, &expected)?;
let expected_module = tester.apply_transform(noop(), "expected.js", syntax, expected)?;

let expected_src = tester.print(&expected_module, &Default::default());

Expand Down