Skip to content

Commit

Permalink
test(linter): fix some oxlint tests on windows (#8204)
Browse files Browse the repository at this point in the history
  • Loading branch information
camc314 authored Jan 1, 2025
1 parent e5ee38f commit cb709c9
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions apps/oxlint/src/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -705,8 +705,10 @@ mod test {
panic!("Expected PrintConfigResult, got {ret:?}")
};

let expect_json =
std::fs::read_to_string("fixtures/print_config/normal/expect.json").unwrap();
#[expect(clippy::disallowed_methods)]
let expect_json = std::fs::read_to_string("fixtures/print_config/normal/expect.json")
.unwrap()
.replace("\r\n", "\n");
assert_eq!(config, expect_json.trim());
}

Expand All @@ -727,8 +729,11 @@ mod test {
panic!("Expected PrintConfigResult, got {ret:?}")
};

let expect_json =
std::fs::read_to_string("fixtures/print_config/ban_rules/expect.json").unwrap();
#[expect(clippy::disallowed_methods)]
let expect_json = std::fs::read_to_string("fixtures/print_config/ban_rules/expect.json")
.unwrap()
.replace("\r\n", "\n");

assert_eq!(config, expect_json.trim());
}

Expand Down

0 comments on commit cb709c9

Please sign in to comment.