Skip to content

Commit c81ca73

Browse files
committed
Add additional test case
1 parent acfef8d commit c81ca73

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

suites/error.json

+6
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,11 @@
1010
"rule": { "error": "NaN" },
1111
"data": null,
1212
"error": true
13+
},
14+
{
15+
"description": "Can throw an error object",
16+
"rule": { "error": { "val": "x" } },
17+
"data": { "x": { "error": "Some error" }},
18+
"error": true
1319
}
1420
]

suites/try.json

+8
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@
108108
"result": "B",
109109
"data": null
110110
},
111+
{
112+
"description": "Error can pull from an error object",
113+
"rule": {
114+
"try": [{ "error": { "val": "x" } }, { "val": "error" }]
115+
},
116+
"data": { "x": { "error": "Some error" }},
117+
"result": "Some error"
118+
},
111119
{
112120
"description": "Try can work further up the AST with Exceptions, and return the error",
113121
"rule": {

0 commit comments

Comments
 (0)