(test)
| 67 | } |
| 68 | |
| 69 | runTest(test) { |
| 70 | try { |
| 71 | this.parse(test, parser); |
| 72 | test.actualError = false; |
| 73 | } catch (err) { |
| 74 | test.actualError = true; |
| 75 | test.actualErrorObject = err; |
| 76 | } |
| 77 | |
| 78 | test.result = test.expectedError !== test.actualError ? "fail" : "pass"; |
| 79 | |
| 80 | return test; |
| 81 | } |
| 82 | |
| 83 | parse(test, parser) { |
| 84 | const tests = typeof test.contents === "string" ? [test] : test.contents; |