Skip to content

Commit

Permalink
chore: fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
ClarkXia committed Nov 28, 2023
1 parent 5e5fc9c commit 20121d0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/loader_compilation/tests/fixtures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use loader_compilation::{CompilationLoader, LoaderOptions};
use rspack_core::{
run_loaders, CompilerContext, CompilerOptions, Loader, LoaderRunnerContext, ResourceData, SideEffectOption,
};
use swc_core::base::config::{PluginConfig, Config};
use swc_core::base::config::Config;

async fn loader_test(actual: impl AsRef<Path>, expected: impl AsRef<Path>) {
let tests_path = PathBuf::from(concat!(env!("CARGO_MANIFEST_DIR"))).join("tests");
Expand All @@ -16,10 +16,13 @@ async fn loader_test(actual: impl AsRef<Path>, expected: impl AsRef<Path>) {
&[Arc::new(CompilationLoader::new(LoaderOptions {
swc_options: options,
transform_features: Default::default(),
compile_rules: Default::default(),
})) as Arc<dyn Loader<LoaderRunnerContext>>],
&ResourceData::new(actual_path.to_string_lossy().to_string(), actual_path),
&[],
CompilerContext {
module: None,
module_context: None,
options: std::sync::Arc::new(CompilerOptions {
context: rspack_core::Context::new(parent_path.to_string_lossy().to_string()),
dev_server: rspack_core::DevServerOptions::default(),
Expand Down

0 comments on commit 20121d0

Please sign in to comment.