Skip to content

Commit

Permalink
Tests: Added comma-dangle tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamund Ferguson committed Sep 14, 2016
1 parent dd29646 commit be1f5c2
Show file tree
Hide file tree
Showing 14 changed files with 2,319 additions and 0 deletions.
388 changes: 388 additions & 0 deletions tests/fixtures/ecma-version/8/comma-dangle-arrow.result.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,388 @@
module.exports = {
"type": "Program",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"range": [
0,
24
],
"body": [
{
"type": "VariableDeclaration",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 24
}
},
"range": [
0,
24
],
"declarations": [
{
"type": "VariableDeclarator",
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 23
}
},
"range": [
4,
23
],
"id": {
"type": "Identifier",
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 7
}
},
"range": [
4,
7
],
"name": "foo"
},
"init": {
"type": "ArrowFunctionExpression",
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 23
}
},
"range": [
10,
23
],
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"loc": {
"start": {
"line": 1,
"column": 11
},
"end": {
"line": 1,
"column": 12
}
},
"range": [
11,
12
],
"name": "a"
},
{
"type": "Identifier",
"loc": {
"start": {
"line": 1,
"column": 14
},
"end": {
"line": 1,
"column": 15
}
},
"range": [
14,
15
],
"name": "b"
}
],
"body": {
"type": "BlockStatement",
"loc": {
"start": {
"line": 1,
"column": 21
},
"end": {
"line": 1,
"column": 23
}
},
"range": [
21,
23
],
"body": []
}
}
}
],
"kind": "var"
}
],
"sourceType": "module",
"tokens": [
{
"type": "Keyword",
"value": "var",
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 3
}
},
"range": [
0,
3
]
},
{
"type": "Identifier",
"value": "foo",
"loc": {
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 7
}
},
"range": [
4,
7
]
},
{
"type": "Punctuator",
"value": "=",
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 9
}
},
"range": [
8,
9
]
},
{
"type": "Punctuator",
"value": "(",
"loc": {
"start": {
"line": 1,
"column": 10
},
"end": {
"line": 1,
"column": 11
}
},
"range": [
10,
11
]
},
{
"type": "Identifier",
"value": "a",
"loc": {
"start": {
"line": 1,
"column": 11
},
"end": {
"line": 1,
"column": 12
}
},
"range": [
11,
12
]
},
{
"type": "Punctuator",
"value": ",",
"loc": {
"start": {
"line": 1,
"column": 12
},
"end": {
"line": 1,
"column": 13
}
},
"range": [
12,
13
]
},
{
"type": "Identifier",
"value": "b",
"loc": {
"start": {
"line": 1,
"column": 14
},
"end": {
"line": 1,
"column": 15
}
},
"range": [
14,
15
]
},
{
"type": "Punctuator",
"value": ",",
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 16
}
},
"range": [
15,
16
]
},
{
"type": "Punctuator",
"value": ")",
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 17
}
},
"range": [
16,
17
]
},
{
"type": "Punctuator",
"value": "=>",
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 20
}
},
"range": [
18,
20
]
},
{
"type": "Punctuator",
"value": "{",
"loc": {
"start": {
"line": 1,
"column": 21
},
"end": {
"line": 1,
"column": 22
}
},
"range": [
21,
22
]
},
{
"type": "Punctuator",
"value": "}",
"loc": {
"start": {
"line": 1,
"column": 22
},
"end": {
"line": 1,
"column": 23
}
},
"range": [
22,
23
]
},
{
"type": "Punctuator",
"value": ";",
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 24
}
},
"range": [
23,
24
]
}
]
}
1 change: 1 addition & 0 deletions tests/fixtures/ecma-version/8/comma-dangle-arrow.src.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
var foo = (a, b,) => {};

0 comments on commit be1f5c2

Please sign in to comment.