diff --git a/packages/babylon/test/fixtures/core/categorized/not-directive/actual.js b/packages/babylon/test/fixtures/core/categorized/not-directive/actual.js new file mode 100644 index 0000000000..2392784f31 --- /dev/null +++ b/packages/babylon/test/fixtures/core/categorized/not-directive/actual.js @@ -0,0 +1 @@ +("not a directive"); diff --git a/packages/babylon/test/fixtures/core/categorized/not-directive/expected.json b/packages/babylon/test/fixtures/core/categorized/not-directive/expected.json new file mode 100644 index 0000000000..7e25efd1e5 --- /dev/null +++ b/packages/babylon/test/fixtures/core/categorized/not-directive/expected.json @@ -0,0 +1,71 @@ +{ + "type": "File", + "start": 0, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 20, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 20 + } + }, + "expression": { + "type": "StringLiteral", + "start": 1, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 18 + } + }, + "extra": { + "rawValue": "not a directive", + "raw": "\"not a directive\"", + "parenthesized": true, + "parenStart": 0 + }, + "value": "not a directive" + } + } + ], + "directives": [] + } +}