diff --git a/src/testdata/emit/json.ts b/src/testdata/emit/json.ts index aa8f858..411bc50 100644 --- a/src/testdata/emit/json.ts +++ b/src/testdata/emit/json.ts @@ -1,3 +1,3 @@ -export { default as data } from "./data.json" assert { - type: "json" +export { default as data } from "./data.json" with { + type: "json" }; diff --git a/src/testdata/source/json.ts b/src/testdata/source/json.ts index b4b9c37..aa8f858 100644 --- a/src/testdata/source/json.ts +++ b/src/testdata/source/json.ts @@ -1,3 +1,3 @@ export { default as data } from "./data.json" assert { - type: "json" + type: "json" }; diff --git a/src/v2.rs b/src/v2.rs index b3fcb30..4edb7b1 100644 --- a/src/v2.rs +++ b/src/v2.rs @@ -1359,7 +1359,7 @@ mod tests { let module = eszip.get_module("file:///json.ts").unwrap(); assert_eq!(module.specifier, "file:///json.ts"); let source = module.source().await.unwrap(); - assert_matches_file!(source, "./testdata/source/json.ts"); + assert_matches_file!(source, "./testdata/emit/json.ts"); let _source_map = module.source_map().await.unwrap(); assert_eq!(module.kind, ModuleKind::JavaScript); let module = eszip.get_module("file:///data.json").unwrap(); @@ -1483,7 +1483,7 @@ mod tests { let module = eszip.get_module("file:///json.ts").unwrap(); assert_eq!(module.specifier, "file:///json.ts"); let source = module.source().await.unwrap(); - assert_matches_file!(source, "./testdata/emit/json.ts"); + assert_matches_file!(source, "./testdata/source/json.ts"); let _source_map = module.source_map().await.unwrap(); assert_eq!(module.kind, ModuleKind::JavaScript); let module = eszip.get_module("file:///data.json").unwrap();