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

Method runTest

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

Source from the content-addressed store, hash-verified

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;

Callers 1

runTestsMethod · 0.95

Calls 1

parseMethod · 0.95

Tested by

no test coverage detected