MCPcopy Create free account
hub / github.com/babel/babel / runTest

Method runTest

scripts/parser-tests/utils/parser-test-runner.js:66–78  ·  view source on GitHub ↗
(test)

Source from the content-addressed store, hash-verified

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;

Callers 1

runTestsMethod · 0.95

Calls 1

parseMethod · 0.95

Tested by

no test coverage detected