Skip to content

Commit

Permalink
Fix Windows tests (no need for snapshots)
Browse files Browse the repository at this point in the history
  • Loading branch information
arendjr committed Feb 26, 2025
1 parent 676452c commit e705705
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 100 deletions.
11 changes: 9 additions & 2 deletions crates/biome_lsp/src/server.tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use std::time::Duration;
use anyhow::{bail, Context, Error, Result};
use biome_analyze::RuleCategories;
use biome_configuration::analyzer::RuleSelector;
use biome_diagnostics::PrintDescription;
use biome_fs::{BiomePath, MemoryFileSystem, TemporaryFs};
use biome_service::workspace::{
GetFileContentParams, GetSyntaxTreeParams, GetSyntaxTreeResult, OpenProjectParams,
Expand Down Expand Up @@ -3052,7 +3053,10 @@ export function bar() {

// ASSERT: One diagnostic should be emitted for the cyclic dependency.
assert_eq!(result.diagnostics.len(), 1);
insta::assert_snapshot!(format!("{:#?}", result.diagnostics));
assert_eq!(
PrintDescription(&result.diagnostics[0]).to_string(),
"This import is part of a cycle."
);

// ARRANGE: Remove `bar.ts`.
std::fs::remove_file(fs.working_directory.join("bar.ts")).expect("Cannot remove bar.ts");
Expand Down Expand Up @@ -3113,7 +3117,10 @@ export function bar() {

// ASSERT: Diagnostic is expected to reappear.
assert_eq!(result.diagnostics.len(), 1);
insta::assert_snapshot!(format!("{:#?}", result.diagnostics));
assert_eq!(
PrintDescription(&result.diagnostics[0]).to_string(),
"This import is part of a cycle."
);

// ARRANGE: Fix `bar.ts`.
fs.create_file(
Expand Down

This file was deleted.

This file was deleted.

0 comments on commit e705705

Please sign in to comment.