diff --git a/packages/babel-parser/test/fixtures/experimental/import-assertions/valid-empty-assertion/input.js b/packages/babel-parser/test/fixtures/experimental/import-assertions/valid-empty-assertion/input.js new file mode 100644 index 000000000000..07adb65ac53c --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/import-assertions/valid-empty-assertion/input.js @@ -0,0 +1 @@ +import "foo" assert {}; diff --git a/packages/babel-parser/test/fixtures/experimental/import-assertions/valid-empty-assertion/output.json b/packages/babel-parser/test/fixtures/experimental/import-assertions/valid-empty-assertion/output.json new file mode 100644 index 000000000000..9d1525afb63e --- /dev/null +++ b/packages/babel-parser/test/fixtures/experimental/import-assertions/valid-empty-assertion/output.json @@ -0,0 +1,28 @@ +{ + "type": "File", + "start":0,"end":23,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":23,"index":23}}, + "program": { + "type": "Program", + "start":0,"end":23,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":23,"index":23}}, + "sourceType": "module", + "interpreter": null, + "body": [ + { + "type": "ImportDeclaration", + "start":0,"end":23,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":23,"index":23}}, + "specifiers": [], + "source": { + "type": "StringLiteral", + "start":7,"end":12,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":1,"column":12,"index":12}}, + "extra": { + "rawValue": "foo", + "raw": "\"foo\"" + }, + "value": "foo" + }, + "assertions": [] + } + ], + "directives": [] + } +}