diff --git a/test/fixtures/syntactic-placeholder/basic/spread-indexed/actual.js b/test/fixtures/syntactic-placeholder/basic/spread-indexed/actual.js new file mode 100644 index 0000000000..374c6a6ea2 --- /dev/null +++ b/test/fixtures/syntactic-placeholder/basic/spread-indexed/actual.js @@ -0,0 +1 @@ +-> [..._1] diff --git a/test/fixtures/syntactic-placeholder/basic/spread-indexed/expected.json b/test/fixtures/syntactic-placeholder/basic/spread-indexed/expected.json new file mode 100644 index 0000000000..9896c70ccc --- /dev/null +++ b/test/fixtures/syntactic-placeholder/basic/spread-indexed/expected.json @@ -0,0 +1,118 @@ +{ + "type": "File", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 0, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [], + "skinny": true, + "body": { + "type": "ArrayExpression", + "start": 3, + "end": 10, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 10 + } + }, + "elements": [ + { + "type": "SpreadElement", + "start": 4, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "argument": { + "type": "PlaceholderExpression", + "start": 7, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "index": 1 + } + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file diff --git a/test/fixtures/syntactic-placeholder/basic/spread/actual.js b/test/fixtures/syntactic-placeholder/basic/spread/actual.js new file mode 100644 index 0000000000..43e03d1cd0 --- /dev/null +++ b/test/fixtures/syntactic-placeholder/basic/spread/actual.js @@ -0,0 +1 @@ +-> [..._] diff --git a/test/fixtures/syntactic-placeholder/basic/spread/expected.json b/test/fixtures/syntactic-placeholder/basic/spread/expected.json new file mode 100644 index 0000000000..758c275d60 --- /dev/null +++ b/test/fixtures/syntactic-placeholder/basic/spread/expected.json @@ -0,0 +1,117 @@ +{ + "type": "File", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "sourceType": "script", + "body": [ + { + "type": "ExpressionStatement", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "expression": { + "type": "ArrowFunctionExpression", + "start": 0, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [], + "skinny": true, + "body": { + "type": "ArrayExpression", + "start": 3, + "end": 9, + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 9 + } + }, + "elements": [ + { + "type": "SpreadElement", + "start": 4, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 8 + } + }, + "argument": { + "type": "PlaceholderExpression", + "start": 7, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + } + } + ] + } + } + } + ], + "directives": [] + } +} \ No newline at end of file