test(es/parser): Add a test for a fixed issue (#7398)

**Related issue:**

 - Closes #6976.
This commit is contained in:
Donny/강동윤 2023-05-16 21:31:05 +09:00 committed by GitHub
parent da0c612d85
commit eaba323581
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 108 additions and 0 deletions

View File

@ -0,0 +1 @@
console.log(1 as number > 0);

View File

@ -0,0 +1,107 @@
{
"type": "Script",
"span": {
"start": 1,
"end": 30,
"ctxt": 0
},
"body": [
{
"type": "ExpressionStatement",
"span": {
"start": 1,
"end": 30,
"ctxt": 0
},
"expression": {
"type": "CallExpression",
"span": {
"start": 1,
"end": 29,
"ctxt": 0
},
"callee": {
"type": "MemberExpression",
"span": {
"start": 1,
"end": 12,
"ctxt": 0
},
"object": {
"type": "Identifier",
"span": {
"start": 1,
"end": 8,
"ctxt": 0
},
"value": "console",
"optional": false
},
"property": {
"type": "Identifier",
"span": {
"start": 9,
"end": 12,
"ctxt": 0
},
"value": "log",
"optional": false
}
},
"arguments": [
{
"spread": null,
"expression": {
"type": "BinaryExpression",
"span": {
"start": 13,
"end": 28,
"ctxt": 0
},
"operator": ">",
"left": {
"type": "TsAsExpression",
"span": {
"start": 13,
"end": 24,
"ctxt": 0
},
"expression": {
"type": "NumericLiteral",
"span": {
"start": 13,
"end": 14,
"ctxt": 0
},
"value": 1.0,
"raw": "1"
},
"typeAnnotation": {
"type": "TsKeywordType",
"span": {
"start": 18,
"end": 24,
"ctxt": 0
},
"kind": "number"
}
},
"right": {
"type": "NumericLiteral",
"span": {
"start": 27,
"end": 28,
"ctxt": 0
},
"value": 0.0,
"raw": "0"
}
}
}
],
"typeArguments": null
}
}
],
"interpreter": null
}