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

**Description:**

I made a mistake while working on `test_inline!`

**Related issue:**

 - #8568
This commit is contained in:
Donny/강동윤 2024-01-29 19:25:42 +09:00 committed by GitHub
parent fd7cf4c30a
commit d683089be1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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());
@ -411,8 +409,8 @@ where
Ok(actual_src)
})
.1
.to_string();
.0
.unwrap();
assert_eq!(
expected_src, actual_src,