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:
Nick Cameron
2025-03-20 11:06:27 +13:00
committed by GitHub
parent 4b6166dc4f
commit a7e09a89ef
551 changed files with 115788 additions and 275855 deletions

View File

@ -7,11 +7,11 @@ description: Result of parsing function_sketch.kcl
"body": [
{
"declaration": {
"end": 220,
"end": 0,
"id": {
"end": 6,
"end": 0,
"name": "box",
"start": 3,
"start": 0,
"type": "Identifier"
},
"init": {
@ -19,11 +19,11 @@ description: Result of parsing function_sketch.kcl
"body": [
{
"declaration": {
"end": 202,
"end": 0,
"id": {
"end": 25,
"end": 0,
"name": "myBox",
"start": 20,
"start": 0,
"type": "Identifier"
},
"init": {
@ -31,22 +31,22 @@ description: Result of parsing function_sketch.kcl
{
"arguments": [
{
"end": 46,
"end": 0,
"raw": "'XY'",
"start": 42,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": "XY"
}
],
"callee": {
"end": 41,
"end": 0,
"name": "startSketchOn",
"start": 28,
"start": 0,
"type": "Identifier"
},
"end": 47,
"start": 28,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
@ -55,9 +55,9 @@ description: Result of parsing function_sketch.kcl
{
"elements": [
{
"end": 72,
"end": 0,
"raw": "0",
"start": 71,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -66,9 +66,9 @@ description: Result of parsing function_sketch.kcl
}
},
{
"end": 75,
"end": 0,
"raw": "0",
"start": 74,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -77,26 +77,26 @@ description: Result of parsing function_sketch.kcl
}
}
],
"end": 76,
"start": 70,
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
},
{
"end": 79,
"start": 78,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"end": 69,
"end": 0,
"name": "startProfileAt",
"start": 55,
"start": 0,
"type": "Identifier"
},
"end": 80,
"start": 55,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
@ -105,17 +105,17 @@ description: Result of parsing function_sketch.kcl
{
"type": "LabeledArg",
"label": {
"end": 96,
"end": 0,
"name": "end",
"start": 93,
"start": 0,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 101,
"end": 0,
"raw": "0",
"start": 100,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -124,28 +124,28 @@ description: Result of parsing function_sketch.kcl
}
},
{
"end": 104,
"end": 0,
"name": "l",
"start": 103,
"start": 0,
"type": "Identifier",
"type": "Identifier"
}
],
"end": 105,
"start": 99,
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 92,
"end": 0,
"name": "line",
"start": 88,
"start": 0,
"type": "Identifier"
},
"end": 106,
"start": 88,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
@ -155,24 +155,24 @@ description: Result of parsing function_sketch.kcl
{
"type": "LabeledArg",
"label": {
"end": 122,
"end": 0,
"name": "end",
"start": 119,
"start": 0,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 127,
"end": 0,
"name": "w",
"start": 126,
"start": 0,
"type": "Identifier",
"type": "Identifier"
},
{
"end": 130,
"end": 0,
"raw": "0",
"start": 129,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -181,21 +181,21 @@ description: Result of parsing function_sketch.kcl
}
}
],
"end": 131,
"start": 125,
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 118,
"end": 0,
"name": "line",
"start": 114,
"start": 0,
"type": "Identifier"
},
"end": 132,
"start": 114,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
@ -205,17 +205,17 @@ description: Result of parsing function_sketch.kcl
{
"type": "LabeledArg",
"label": {
"end": 148,
"end": 0,
"name": "end",
"start": 145,
"start": 0,
"type": "Identifier"
},
"arg": {
"elements": [
{
"end": 153,
"end": 0,
"raw": "0",
"start": 152,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -225,34 +225,34 @@ description: Result of parsing function_sketch.kcl
},
{
"argument": {
"end": 157,
"end": 0,
"name": "l",
"start": 156,
"start": 0,
"type": "Identifier",
"type": "Identifier"
},
"end": 157,
"end": 0,
"operator": "-",
"start": 155,
"start": 0,
"type": "UnaryExpression",
"type": "UnaryExpression"
}
],
"end": 158,
"start": 151,
"end": 0,
"start": 0,
"type": "ArrayExpression",
"type": "ArrayExpression"
}
}
],
"callee": {
"end": 144,
"end": 0,
"name": "line",
"start": 140,
"start": 0,
"type": "Identifier"
},
"end": 159,
"start": 140,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
@ -260,20 +260,20 @@ description: Result of parsing function_sketch.kcl
{
"arguments": [
{
"end": 174,
"start": 173,
"end": 0,
"start": 0,
"type": "PipeSubstitution",
"type": "PipeSubstitution"
}
],
"callee": {
"end": 172,
"end": 0,
"name": "close",
"start": 167,
"start": 0,
"type": "Identifier"
},
"end": 175,
"start": 167,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
@ -282,68 +282,68 @@ description: Result of parsing function_sketch.kcl
{
"type": "LabeledArg",
"label": {
"end": 197,
"end": 0,
"name": "length",
"start": 191,
"start": 0,
"type": "Identifier"
},
"arg": {
"end": 201,
"end": 0,
"name": "h",
"start": 200,
"start": 0,
"type": "Identifier",
"type": "Identifier"
}
}
],
"callee": {
"end": 190,
"end": 0,
"name": "extrude",
"start": 183,
"start": 0,
"type": "Identifier"
},
"end": 202,
"start": 183,
"end": 0,
"start": 0,
"type": "CallExpressionKw",
"type": "CallExpressionKw",
"unlabeled": null
}
],
"end": 202,
"start": 28,
"end": 0,
"start": 0,
"type": "PipeExpression",
"type": "PipeExpression"
},
"start": 20,
"start": 0,
"type": "VariableDeclarator"
},
"end": 202,
"end": 0,
"kind": "const",
"start": 20,
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
},
{
"argument": {
"end": 218,
"end": 0,
"name": "myBox",
"start": 213,
"start": 0,
"type": "Identifier",
"type": "Identifier"
},
"end": 218,
"start": 206,
"end": 0,
"start": 0,
"type": "ReturnStatement",
"type": "ReturnStatement"
}
],
"end": 220,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"0": [
{
"end": 206,
"start": 202,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLine"
@ -353,46 +353,46 @@ description: Result of parsing function_sketch.kcl
},
"startNodes": []
},
"start": 16
"start": 0
},
"end": 220,
"end": 0,
"params": [
{
"type": "Parameter",
"identifier": {
"end": 8,
"end": 0,
"name": "h",
"start": 7,
"start": 0,
"type": "Identifier"
}
},
{
"type": "Parameter",
"identifier": {
"end": 11,
"end": 0,
"name": "l",
"start": 10,
"start": 0,
"type": "Identifier"
}
},
{
"type": "Parameter",
"identifier": {
"end": 14,
"end": 0,
"name": "w",
"start": 13,
"start": 0,
"type": "Identifier"
}
}
],
"start": 6,
"start": 0,
"type": "FunctionExpression",
"type": "FunctionExpression"
},
"start": 3,
"start": 0,
"type": "VariableDeclarator"
},
"end": 220,
"end": 0,
"kind": "fn",
"start": 0,
"type": "VariableDeclaration",
@ -400,19 +400,19 @@ description: Result of parsing function_sketch.kcl
},
{
"declaration": {
"end": 243,
"end": 0,
"id": {
"end": 227,
"end": 0,
"name": "fnBox",
"start": 222,
"start": 0,
"type": "Identifier"
},
"init": {
"arguments": [
{
"end": 235,
"end": 0,
"raw": "3",
"start": 234,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -421,9 +421,9 @@ description: Result of parsing function_sketch.kcl
}
},
{
"end": 238,
"end": 0,
"raw": "6",
"start": 237,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -432,9 +432,9 @@ description: Result of parsing function_sketch.kcl
}
},
{
"end": 242,
"end": 0,
"raw": "10",
"start": 240,
"start": 0,
"type": "Literal",
"type": "Literal",
"value": {
@ -444,33 +444,33 @@ description: Result of parsing function_sketch.kcl
}
],
"callee": {
"end": 233,
"end": 0,
"name": "box",
"start": 230,
"start": 0,
"type": "Identifier"
},
"end": 243,
"start": 230,
"end": 0,
"start": 0,
"type": "CallExpression",
"type": "CallExpression"
},
"start": 222,
"start": 0,
"type": "VariableDeclarator"
},
"end": 243,
"end": 0,
"kind": "const",
"start": 222,
"start": 0,
"type": "VariableDeclaration",
"type": "VariableDeclaration"
}
],
"end": 244,
"end": 0,
"nonCodeMeta": {
"nonCodeNodes": {
"0": [
{
"end": 222,
"start": 220,
"end": 0,
"start": 0,
"type": "NonCodeNode",
"value": {
"type": "newLine"