Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Dec 11, 2024
1 parent ffda4aa commit 9c05474
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/biome_js_analyze/tests/spec_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use biome_diagnostics::advice::CodeSuggestionAdvice;
use biome_diagnostics::{DiagnosticExt, Severity};
use biome_fs::OsFileSystem;
use biome_js_parser::{parse, JsParserOptions};
use biome_js_syntax::{JsFileSource, JsLanguage, LanguageVariant, ModuleKind};
use biome_js_syntax::{JsFileSource, JsLanguage, ModuleKind};
use biome_plugin_loader::AnalyzerGritPlugin;
use biome_project::PackageType;
use biome_rowan::AstNode;
Expand Down
5 changes: 4 additions & 1 deletion crates/biome_js_formatter/tests/spec_test.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use biome_formatter_test::spec::{SpecSnapshot, SpecTestFile};
use biome_js_formatter::{context::JsFormatOptions, JsFormatLanguage};
use biome_js_syntax::{JsFileSource, ModuleKind};
use biome_js_syntax::{JsFileSource, LanguageVariant, ModuleKind};
use std::path::Path;

mod language {
Expand Down Expand Up @@ -35,6 +35,9 @@ pub fn run(spec_input_file: &str, _expected_file: &str, test_directory: &str, fi
if file_type != "module" {
source_type = source_type.with_module_kind(ModuleKind::Script);
}
if !source_type.is_typescript() {
source_type.set_variant(LanguageVariant::Jsx);
}

let options = JsFormatOptions::new(source_type);
let language = language::JsTestFormatLanguage::new(source_type);
Expand Down

0 comments on commit 9c05474

Please sign in to comment.