Andy 0545173f66 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
2017-03-19 22:03:11 +01:00

191 lines
4.6 KiB
JSON

{
"type": "File",
"start": 0,
"end": 47,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 47
}
},
"program": {
"type": "Program",
"start": 0,
"end": 47,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 47
}
},
"sourceType": "script",
"body": [
{
"type": "SwitchStatement",
"start": 0,
"end": 47,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 47
}
},
"discriminant": {
"type": "Identifier",
"start": 8,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 8
},
"end": {
"line": 1,
"column": 14
},
"identifierName": "answer"
},
"name": "answer"
},
"cases": [
{
"type": "SwitchCase",
"start": 18,
"end": 45,
"loc": {
"start": {
"line": 1,
"column": 18
},
"end": {
"line": 1,
"column": 45
}
},
"consequent": [
{
"type": "VariableDeclaration",
"start": 27,
"end": 38,
"loc": {
"start": {
"line": 1,
"column": 27
},
"end": {
"line": 1,
"column": 38
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 31,
"end": 37,
"loc": {
"start": {
"line": 1,
"column": 31
},
"end": {
"line": 1,
"column": 37
}
},
"id": {
"type": "Identifier",
"start": 31,
"end": 32,
"loc": {
"start": {
"line": 1,
"column": 31
},
"end": {
"line": 1,
"column": 32
},
"identifierName": "t"
},
"name": "t"
},
"init": {
"type": "NumericLiteral",
"start": 35,
"end": 37,
"loc": {
"start": {
"line": 1,
"column": 35
},
"end": {
"line": 1,
"column": 37
}
},
"extra": {
"rawValue": 42,
"raw": "42"
},
"value": 42
}
}
],
"kind": "let"
},
{
"type": "BreakStatement",
"start": 39,
"end": 45,
"loc": {
"start": {
"line": 1,
"column": 39
},
"end": {
"line": 1,
"column": 45
}
},
"label": null
}
],
"test": {
"type": "NumericLiteral",
"start": 23,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 25
}
},
"extra": {
"rawValue": 42,
"raw": "42"
},
"value": 42
}
}
]
}
],
"directives": []
}
}