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:
@ -1,5 +1,5 @@
|
||||
---
|
||||
source: kcl/src/simulation_tests.rs
|
||||
source: kcl-lib/src/simulation_tests.rs
|
||||
description: Result of parsing argument_error.kcl
|
||||
---
|
||||
{
|
||||
@ -7,11 +7,11 @@ description: Result of parsing argument_error.kcl
|
||||
"body": [
|
||||
{
|
||||
"declaration": {
|
||||
"end": 22,
|
||||
"end": 0,
|
||||
"id": {
|
||||
"end": 4,
|
||||
"end": 0,
|
||||
"name": "f",
|
||||
"start": 3,
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"init": {
|
||||
@ -19,9 +19,9 @@ description: Result of parsing argument_error.kcl
|
||||
"body": [
|
||||
{
|
||||
"argument": {
|
||||
"end": 20,
|
||||
"end": 0,
|
||||
"raw": "5",
|
||||
"start": 19,
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -29,57 +29,57 @@ description: Result of parsing argument_error.kcl
|
||||
"suffix": "None"
|
||||
}
|
||||
},
|
||||
"end": 20,
|
||||
"start": 12,
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "ReturnStatement",
|
||||
"type": "ReturnStatement"
|
||||
}
|
||||
],
|
||||
"end": 22,
|
||||
"start": 8
|
||||
"end": 0,
|
||||
"start": 0
|
||||
},
|
||||
"end": 22,
|
||||
"end": 0,
|
||||
"params": [
|
||||
{
|
||||
"type": "Parameter",
|
||||
"identifier": {
|
||||
"end": 6,
|
||||
"end": 0,
|
||||
"name": "i",
|
||||
"start": 5,
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
}
|
||||
}
|
||||
],
|
||||
"start": 4,
|
||||
"start": 0,
|
||||
"type": "FunctionExpression",
|
||||
"type": "FunctionExpression"
|
||||
},
|
||||
"start": 3,
|
||||
"start": 0,
|
||||
"type": "VariableDeclarator"
|
||||
},
|
||||
"end": 22,
|
||||
"end": 0,
|
||||
"kind": "fn",
|
||||
"start": 0,
|
||||
"type": "VariableDeclaration",
|
||||
"type": "VariableDeclaration"
|
||||
},
|
||||
{
|
||||
"end": 38,
|
||||
"end": 0,
|
||||
"expression": {
|
||||
"arguments": [
|
||||
{
|
||||
"end": 29,
|
||||
"end": 0,
|
||||
"name": "f",
|
||||
"start": 28,
|
||||
"start": 0,
|
||||
"type": "Identifier",
|
||||
"type": "Identifier"
|
||||
},
|
||||
{
|
||||
"elements": [
|
||||
{
|
||||
"end": 33,
|
||||
"end": 0,
|
||||
"raw": "0",
|
||||
"start": 32,
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -88,9 +88,9 @@ description: Result of parsing argument_error.kcl
|
||||
}
|
||||
},
|
||||
{
|
||||
"end": 36,
|
||||
"end": 0,
|
||||
"raw": "1",
|
||||
"start": 35,
|
||||
"start": 0,
|
||||
"type": "Literal",
|
||||
"type": "Literal",
|
||||
"value": {
|
||||
@ -99,35 +99,35 @@ description: Result of parsing argument_error.kcl
|
||||
}
|
||||
}
|
||||
],
|
||||
"end": 37,
|
||||
"start": 31,
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "ArrayExpression",
|
||||
"type": "ArrayExpression"
|
||||
}
|
||||
],
|
||||
"callee": {
|
||||
"end": 27,
|
||||
"end": 0,
|
||||
"name": "map",
|
||||
"start": 24,
|
||||
"start": 0,
|
||||
"type": "Identifier"
|
||||
},
|
||||
"end": 38,
|
||||
"start": 24,
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "CallExpression",
|
||||
"type": "CallExpression"
|
||||
},
|
||||
"start": 24,
|
||||
"start": 0,
|
||||
"type": "ExpressionStatement",
|
||||
"type": "ExpressionStatement"
|
||||
}
|
||||
],
|
||||
"end": 39,
|
||||
"end": 0,
|
||||
"nonCodeMeta": {
|
||||
"nonCodeNodes": {
|
||||
"0": [
|
||||
{
|
||||
"end": 24,
|
||||
"start": 22,
|
||||
"end": 0,
|
||||
"start": 0,
|
||||
"type": "NonCodeNode",
|
||||
"value": {
|
||||
"type": "newLine"
|
||||
|
||||
Reference in New Issue
Block a user