Skip to content

Commit

Permalink
Spread placeholder tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wcjohnson committed Jul 17, 2017
1 parent 73b9d32 commit 32e43a0
Show file tree
Hide file tree
Showing 4 changed files with 237 additions and 0 deletions.
@@ -0,0 +1 @@
-> [..._1]
118 changes: 118 additions & 0 deletions 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": []
}
}
1 change: 1 addition & 0 deletions test/fixtures/syntactic-placeholder/basic/spread/actual.js
@@ -0,0 +1 @@
-> [..._]
117 changes: 117 additions & 0 deletions 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": []
}
}

0 comments on commit 32e43a0

Please sign in to comment.