Test runner: Detect extra property in 'actual' but not in 'expected'. (#407)
* Test runner: Detect extra property in 'actual' but not in 'expected'. Also update all expected.json where this would result in errors. * Include rmExpected.js script in case it is needed again
This commit is contained in:
3
test/fixtures/comments/basic/block-trailing-comment/expected.json
vendored
Executable file → Normal file
3
test/fixtures/comments/basic/block-trailing-comment/expected.json
vendored
Executable file → Normal file
@@ -83,7 +83,8 @@
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 5
|
||||
}
|
||||
},
|
||||
"identifierName": "a"
|
||||
},
|
||||
"name": "a"
|
||||
},
|
||||
|
||||
3
test/fixtures/comments/basic/comment-within-condition/expected.json
vendored
Executable file → Normal file
3
test/fixtures/comments/basic/comment-within-condition/expected.json
vendored
Executable file → Normal file
@@ -54,7 +54,8 @@
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"identifierName": "a"
|
||||
},
|
||||
"name": "a",
|
||||
"leadingComments": [
|
||||
|
||||
6
test/fixtures/comments/basic/export-default-anonymous-class/expected.json
vendored
Executable file → Normal file
6
test/fixtures/comments/basic/export-default-anonymous-class/expected.json
vendored
Executable file → Normal file
@@ -87,6 +87,7 @@
|
||||
"column": 5
|
||||
}
|
||||
},
|
||||
"static": false,
|
||||
"computed": false,
|
||||
"key": {
|
||||
"type": "Identifier",
|
||||
@@ -100,16 +101,17 @@
|
||||
"end": {
|
||||
"line": 8,
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"identifierName": "method1"
|
||||
},
|
||||
"name": "method1",
|
||||
"leadingComments": null
|
||||
},
|
||||
"static": false,
|
||||
"kind": "method",
|
||||
"id": null,
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"async": false,
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
|
||||
@@ -69,9 +69,11 @@
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"identifierName": "spawn"
|
||||
},
|
||||
"name": "spawn"
|
||||
"name": "spawn",
|
||||
"leadingComments": null
|
||||
},
|
||||
"local": {
|
||||
"type": "Identifier",
|
||||
@@ -85,10 +87,12 @@
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"identifierName": "spawn"
|
||||
},
|
||||
"name": "spawn"
|
||||
}
|
||||
},
|
||||
"leadingComments": null
|
||||
}
|
||||
],
|
||||
"source": {
|
||||
@@ -151,4 +155,4 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -101,9 +101,11 @@
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"identifierName": "spawn"
|
||||
},
|
||||
"name": "spawn"
|
||||
"name": "spawn",
|
||||
"leadingComments": null
|
||||
},
|
||||
"value": {
|
||||
"type": "Identifier",
|
||||
@@ -117,15 +119,18 @@
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 11
|
||||
}
|
||||
},
|
||||
"identifierName": "spawn"
|
||||
},
|
||||
"name": "spawn"
|
||||
},
|
||||
"leadingComments": null,
|
||||
"extra": {
|
||||
"shorthand": true
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
"leadingComments": null
|
||||
},
|
||||
"init": {
|
||||
"type": "Identifier",
|
||||
@@ -139,10 +144,12 @@
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 17
|
||||
}
|
||||
},
|
||||
"identifierName": "x"
|
||||
},
|
||||
"name": "x"
|
||||
}
|
||||
},
|
||||
"leadingComments": null
|
||||
}
|
||||
],
|
||||
"kind": "var",
|
||||
@@ -186,4 +193,4 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
7
test/fixtures/comments/basic/surrounding-call-comments/expected.json
vendored
Executable file → Normal file
7
test/fixtures/comments/basic/surrounding-call-comments/expected.json
vendored
Executable file → Normal file
@@ -54,12 +54,14 @@
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
"identifierName": "a"
|
||||
},
|
||||
"name": "a"
|
||||
},
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"async": false,
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
@@ -116,7 +118,8 @@
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 7
|
||||
}
|
||||
},
|
||||
"identifierName": "foo"
|
||||
},
|
||||
"name": "foo",
|
||||
"leadingComments": null
|
||||
|
||||
4
test/fixtures/comments/basic/surrounding-debugger-comments/expected.json
vendored
Executable file → Normal file
4
test/fixtures/comments/basic/surrounding-debugger-comments/expected.json
vendored
Executable file → Normal file
@@ -54,12 +54,14 @@
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
"identifierName": "a"
|
||||
},
|
||||
"name": "a"
|
||||
},
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"async": false,
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
|
||||
4
test/fixtures/comments/basic/surrounding-return-comments/expected.json
vendored
Executable file → Normal file
4
test/fixtures/comments/basic/surrounding-return-comments/expected.json
vendored
Executable file → Normal file
@@ -54,12 +54,14 @@
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
"identifierName": "a"
|
||||
},
|
||||
"name": "a"
|
||||
},
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"async": false,
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
|
||||
4
test/fixtures/comments/basic/surrounding-throw-comments/expected.json
vendored
Executable file → Normal file
4
test/fixtures/comments/basic/surrounding-throw-comments/expected.json
vendored
Executable file → Normal file
@@ -54,12 +54,14 @@
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
"identifierName": "a"
|
||||
},
|
||||
"name": "a"
|
||||
},
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"async": false,
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
|
||||
7
test/fixtures/comments/basic/surrounding-while-loop-comments/expected.json
vendored
Executable file → Normal file
7
test/fixtures/comments/basic/surrounding-while-loop-comments/expected.json
vendored
Executable file → Normal file
@@ -54,12 +54,14 @@
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
"identifierName": "f"
|
||||
},
|
||||
"name": "f"
|
||||
},
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"async": false,
|
||||
"params": [],
|
||||
"body": {
|
||||
"type": "BlockStatement",
|
||||
@@ -204,7 +206,8 @@
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 65
|
||||
}
|
||||
},
|
||||
"identifierName": "each"
|
||||
},
|
||||
"name": "each",
|
||||
"leadingComments": null
|
||||
|
||||
13
test/fixtures/comments/basic/switch-fallthrough-comment-in-function/expected.json
vendored
Executable file → Normal file
13
test/fixtures/comments/basic/switch-fallthrough-comment-in-function/expected.json
vendored
Executable file → Normal file
@@ -54,12 +54,14 @@
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"identifierName": "bar"
|
||||
},
|
||||
"name": "bar"
|
||||
},
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"async": false,
|
||||
"params": [
|
||||
{
|
||||
"type": "Identifier",
|
||||
@@ -73,7 +75,8 @@
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"identifierName": "foo"
|
||||
},
|
||||
"name": "foo"
|
||||
}
|
||||
@@ -119,7 +122,8 @@
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"identifierName": "foo"
|
||||
},
|
||||
"name": "foo"
|
||||
},
|
||||
@@ -252,7 +256,8 @@
|
||||
"end": {
|
||||
"line": 7,
|
||||
"column": 16
|
||||
}
|
||||
},
|
||||
"identifierName": "doIt"
|
||||
},
|
||||
"name": "doIt"
|
||||
},
|
||||
|
||||
6
test/fixtures/comments/basic/switch-fallthrough-comment/expected.json
vendored
Executable file → Normal file
6
test/fixtures/comments/basic/switch-fallthrough-comment/expected.json
vendored
Executable file → Normal file
@@ -54,7 +54,8 @@
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 10
|
||||
}
|
||||
},
|
||||
"identifierName": "foo"
|
||||
},
|
||||
"name": "foo"
|
||||
},
|
||||
@@ -187,7 +188,8 @@
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"identifierName": "doIt"
|
||||
},
|
||||
"name": "doIt"
|
||||
},
|
||||
|
||||
10
test/fixtures/comments/basic/switch-no-default-comment-in-function/expected.json
vendored
Executable file → Normal file
10
test/fixtures/comments/basic/switch-no-default-comment-in-function/expected.json
vendored
Executable file → Normal file
@@ -54,12 +54,14 @@
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 12
|
||||
}
|
||||
},
|
||||
"identifierName": "bar"
|
||||
},
|
||||
"name": "bar"
|
||||
},
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"async": false,
|
||||
"params": [
|
||||
{
|
||||
"type": "Identifier",
|
||||
@@ -73,7 +75,8 @@
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"identifierName": "a"
|
||||
},
|
||||
"name": "a"
|
||||
}
|
||||
@@ -119,7 +122,8 @@
|
||||
"end": {
|
||||
"line": 2,
|
||||
"column": 13
|
||||
}
|
||||
},
|
||||
"identifierName": "a"
|
||||
},
|
||||
"name": "a"
|
||||
},
|
||||
|
||||
43
test/fixtures/comments/basic/switch-no-default-comment-in-nested-functions/expected.json
vendored
Executable file → Normal file
43
test/fixtures/comments/basic/switch-no-default-comment-in-nested-functions/expected.json
vendored
Executable file → Normal file
@@ -83,7 +83,8 @@
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 6
|
||||
}
|
||||
},
|
||||
"identifierName": "module"
|
||||
},
|
||||
"name": "module"
|
||||
},
|
||||
@@ -99,7 +100,8 @@
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 14
|
||||
}
|
||||
},
|
||||
"identifierName": "exports"
|
||||
},
|
||||
"name": "exports"
|
||||
},
|
||||
@@ -122,6 +124,7 @@
|
||||
"id": null,
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"async": false,
|
||||
"params": [
|
||||
{
|
||||
"type": "Identifier",
|
||||
@@ -135,7 +138,8 @@
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 33
|
||||
}
|
||||
},
|
||||
"identifierName": "context"
|
||||
},
|
||||
"name": "context"
|
||||
}
|
||||
@@ -181,12 +185,14 @@
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 23
|
||||
}
|
||||
},
|
||||
"identifierName": "isConstant"
|
||||
},
|
||||
"name": "isConstant"
|
||||
},
|
||||
"generator": false,
|
||||
"expression": false,
|
||||
"async": false,
|
||||
"params": [
|
||||
{
|
||||
"type": "Identifier",
|
||||
@@ -200,7 +206,8 @@
|
||||
"end": {
|
||||
"line": 3,
|
||||
"column": 28
|
||||
}
|
||||
},
|
||||
"identifierName": "node"
|
||||
},
|
||||
"name": "node"
|
||||
}
|
||||
@@ -260,7 +267,8 @@
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 20
|
||||
}
|
||||
},
|
||||
"identifierName": "node"
|
||||
},
|
||||
"name": "node"
|
||||
},
|
||||
@@ -276,7 +284,8 @@
|
||||
"end": {
|
||||
"line": 4,
|
||||
"column": 25
|
||||
}
|
||||
},
|
||||
"identifierName": "type"
|
||||
},
|
||||
"name": "type"
|
||||
},
|
||||
@@ -338,7 +347,8 @@
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 33
|
||||
}
|
||||
},
|
||||
"identifierName": "isConstant"
|
||||
},
|
||||
"name": "isConstant"
|
||||
},
|
||||
@@ -383,7 +393,8 @@
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 38
|
||||
}
|
||||
},
|
||||
"identifierName": "node"
|
||||
},
|
||||
"name": "node"
|
||||
},
|
||||
@@ -399,7 +410,8 @@
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 50
|
||||
}
|
||||
},
|
||||
"identifierName": "expressions"
|
||||
},
|
||||
"name": "expressions"
|
||||
},
|
||||
@@ -459,7 +471,8 @@
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 55
|
||||
}
|
||||
},
|
||||
"identifierName": "node"
|
||||
},
|
||||
"name": "node"
|
||||
},
|
||||
@@ -475,7 +488,8 @@
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 67
|
||||
}
|
||||
},
|
||||
"identifierName": "expressions"
|
||||
},
|
||||
"name": "expressions"
|
||||
},
|
||||
@@ -493,7 +507,8 @@
|
||||
"end": {
|
||||
"line": 6,
|
||||
"column": 74
|
||||
}
|
||||
},
|
||||
"identifierName": "length"
|
||||
},
|
||||
"name": "length"
|
||||
},
|
||||
@@ -631,4 +646,4 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
3
test/fixtures/comments/basic/switch-no-default-comment/expected.json
vendored
Executable file → Normal file
3
test/fixtures/comments/basic/switch-no-default-comment/expected.json
vendored
Executable file → Normal file
@@ -54,7 +54,8 @@
|
||||
"end": {
|
||||
"line": 1,
|
||||
"column": 9
|
||||
}
|
||||
},
|
||||
"identifierName": "a"
|
||||
},
|
||||
"name": "a"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user