From 3ca75dc9ecb12da1eaef5b16659b8dfbf509e47c Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Tue, 30 May 2017 15:31:13 -0400 Subject: [PATCH] Adds test to ensure that numericSeparator plugin does not alter "_" handling in Identifier (#548) --- .../identifier-start-0/actual.js | 1 + .../identifier-start-0/expected.json | 66 +++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 test/fixtures/experimental/numeric-literal-separator/identifier-start-0/actual.js create mode 100644 test/fixtures/experimental/numeric-literal-separator/identifier-start-0/expected.json diff --git a/test/fixtures/experimental/numeric-literal-separator/identifier-start-0/actual.js b/test/fixtures/experimental/numeric-literal-separator/identifier-start-0/actual.js new file mode 100644 index 0000000000..adc9bff555 --- /dev/null +++ b/test/fixtures/experimental/numeric-literal-separator/identifier-start-0/actual.js @@ -0,0 +1 @@ +_123 diff --git a/test/fixtures/experimental/numeric-literal-separator/identifier-start-0/expected.json b/test/fixtures/experimental/numeric-literal-separator/identifier-start-0/expected.json new file mode 100644 index 0000000000..70cf57a548 --- /dev/null +++ b/test/fixtures/experimental/numeric-literal-separator/identifier-start-0/expected.json @@ -0,0 +1,66 @@ +{ + "type": "File", + "start": 0, + "end": 4, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 4, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 4, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + }, + "expression": { + "type": "Identifier", + "start": 0, + "end": 4, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + }, + "identifierName": "_123" + }, + "name": "_123" + } + } + ], + "directives": [] + } +} \ No newline at end of file