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