diff --git a/tests/js/import-assertions/__snapshots__/jsfmt.spec.js.snap b/tests/js/import-assertions/__snapshots__/jsfmt.spec.js.snap index df01ffc7403d..4ea0898ac071 100644 --- a/tests/js/import-assertions/__snapshots__/jsfmt.spec.js.snap +++ b/tests/js/import-assertions/__snapshots__/jsfmt.spec.js.snap @@ -42,6 +42,20 @@ import json from "./foo.json" assert { type: "json" }; ================================================================================ `; +exports[`import-assertions-without-from.js format 1`] = ` +====================================options===================================== +parsers: ["babel"] +printWidth: 80 + | printWidth +=====================================input====================================== +import "foo" assert { type: "json" } + +=====================================output===================================== +import "foo" assert { type: "json" }; + +================================================================================ +`; + exports[`not-import-assertions.js format 1`] = ` ====================================options===================================== parsers: ["babel"] diff --git a/tests/js/import-assertions/import-assertions-without-from.js b/tests/js/import-assertions/import-assertions-without-from.js new file mode 100644 index 000000000000..daf38156ebb5 --- /dev/null +++ b/tests/js/import-assertions/import-assertions-without-from.js @@ -0,0 +1 @@ +import "foo" assert { type: "json" } diff --git a/tests/js/import-assertions/jsfmt.spec.js b/tests/js/import-assertions/jsfmt.spec.js index 7599ddea9386..9430e1f1a4d7 100644 --- a/tests/js/import-assertions/jsfmt.spec.js +++ b/tests/js/import-assertions/jsfmt.spec.js @@ -4,11 +4,13 @@ run_spec(__dirname, ["babel"], { "import-assertions-dynamic.js", "import-assertions-multi-types.js", "import-assertions-static.js", + "import-assertions-without-from.js", ], meriyah: [ "import-assertions-dynamic.js", "import-assertions-multi-types.js", "import-assertions-static.js", + "import-assertions-without-from.js", ], }, });