Improve snapshot testing (#5856)
* Improve snapshot testing Signed-off-by: Nick Cameron <nrc@ncameron.org> * A snapshot a day keeps the bugs away! 📷🐛 * A snapshot a day keeps the bugs away! 📷🐛 --------- Signed-off-by: Nick Cameron <nrc@ncameron.org> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -7,11 +7,11 @@ description: Result of parsing kw_fn_with_defaults.kcl
|
||||
"body": [
|
||||
{
|
||||
"declaration": {
|
||||
"end": 45,
|
||||
"end": 0,
|
||||
"id": {
|
||||
"end": 12,
|
||||
"end": 0,
|
||||
"name": "increment",
|
||||
"start": 3,
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
@ -19,43 +19,43 @@ description: Result of parsing kw_fn_with_defaults.kcl
|
||||
"body": [
|
||||
{
|
||||
"argument": {
|
||||
"end": 43,
|
||||
"end": 0,
|
||||
"left": {
|
||||
"end": 38,
|
||||
"end": 0,
|
||||
"name": "x",
|
||||
"start": 37,
|
||||
"start": 0,
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
},
|
||||
"operator": "+",
|
||||
"right": {
|
||||
"end": 43,
|
||||
"end": 0,
|
||||
"name": "by",
|
||||
"start": 41,
|
||||
"start": 0,
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
},
|
||||
"start": 37,
|
||||
"start": 0,
|
||||
"type": "BinaryExpression",
|
||||
"type": "BinaryExpression"
|
||||
},
|
||||
"end": 43,
|
||||
"start": 30,
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "ReturnStatement",
|
||||
"type": "ReturnStatement"
|
||||
}
|
||||
],
|
||||
"end": 45,
|
||||
"start": 26
|
||||
"end": 0,
|
||||
"start": 0
|
||||
},
|
||||
"end": 45,
|
||||
"end": 0,
|
||||
"params": [
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": {
|
||||
"end": 15,
|
||||
"end": 0,
|
||||
"name": "x",
|
||||
"start": 14,
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"labeled": false
|
||||
@ -63,15 +63,15 @@ description: Result of parsing kw_fn_with_defaults.kcl
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": {
|
||||
"end": 19,
|
||||
"end": 0,
|
||||
"name": "by",
|
||||
"start": 17,
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"default_value": {
|
||||
"end": 24,
|
||||
"end": 0,
|
||||
"raw": "1",
|
||||
"start": 23,
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -81,14 +81,14 @@ description: Result of parsing kw_fn_with_defaults.kcl
|
||||
}
|
||||
}
|
||||
],
|
||||
"start": 12,
|
||||
"start": 0,
|
||||
"type": "FunctionExpression",
|
||||
"type": "FunctionExpression"
|
||||
},
|
||||
"start": 3,
|
||||
"start": 0,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 45,
|
||||
"end": 0,
|
||||
"kind": "fn",
|
||||
"start": 0,
|
||||
"type": "VariableDeclaration",
|
||||
@ -96,19 +96,19 @@ description: Result of parsing kw_fn_with_defaults.kcl
|
||||
},
|
||||
{
|
||||
"declaration": {
|
||||
"end": 65,
|
||||
"end": 0,
|
||||
"id": {
|
||||
"end": 50,
|
||||
"end": 0,
|
||||
"name": "two",
|
||||
"start": 47,
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
"arguments": [
|
||||
{
|
||||
"end": 64,
|
||||
"end": 0,
|
||||
"raw": "1",
|
||||
"start": 63,
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -118,32 +118,32 @@ description: Result of parsing kw_fn_with_defaults.kcl
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 62,
|
||||
"end": 0,
|
||||
"name": "increment",
|
||||
"start": 53,
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 65,
|
||||
"start": 53,
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
},
|
||||
"start": 47,
|
||||
"start": 0,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 65,
|
||||
"end": 0,
|
||||
"kind": "const",
|
||||
"start": 47,
|
||||
"start": 0,
|
||||
"type": "VariableDeclaration",
|
||||
"type": "VariableDeclaration"
|
||||
},
|
||||
{
|
||||
"declaration": {
|
||||
"end": 99,
|
||||
"end": 0,
|
||||
"id": {
|
||||
"end": 75,
|
||||
"end": 0,
|
||||
"name": "twentyOne",
|
||||
"start": 66,
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
@ -151,15 +151,15 @@ description: Result of parsing kw_fn_with_defaults.kcl
|
||||
{
|
||||
"type": "LabeledArg",
|
||||
"label": {
|
||||
"end": 93,
|
||||
"end": 0,
|
||||
"name": "by",
|
||||
"start": 91,
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"arg": {
|
||||
"end": 98,
|
||||
"end": 0,
|
||||
"raw": "20",
|
||||
"start": 96,
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -170,19 +170,19 @@ description: Result of parsing kw_fn_with_defaults.kcl
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 87,
|
||||
"end": 0,
|
||||
"name": "increment",
|
||||
"start": 78,
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 99,
|
||||
"start": 78,
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "CallExpressionKw",
|
||||
"type": "CallExpressionKw",
|
||||
"unlabeled": {
|
||||
"end": 89,
|
||||
"end": 0,
|
||||
"raw": "1",
|
||||
"start": 88,
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -191,23 +191,23 @@ description: Result of parsing kw_fn_with_defaults.kcl
|
||||
}
|
||||
}
|
||||
},
|
||||
"start": 66,
|
||||
"start": 0,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 99,
|
||||
"end": 0,
|
||||
"kind": "const",
|
||||
"start": 66,
|
||||
"start": 0,
|
||||
"type": "VariableDeclaration",
|
||||
"type": "VariableDeclaration"
|
||||
}
|
||||
],
|
||||
"end": 100,
|
||||
"end": 0,
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {
|
||||
"0": [
|
||||
{
|
||||
"end": 47,
|
||||
"start": 45,
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "NonCodeNode",
|
||||
"value": {
|
||||
"type": "newLine"
|
||||
|
||||
Reference in New Issue
Block a user