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

Method runTest

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

Source from the content-addressed store, hash-verified

65 }
66
67 runTest(test) {
68 try {
69 this.parse(test, parser);
70 test.actualError = false;
71 } catch (err) {
72 test.actualError = true;
73 test.actualErrorObject = err;
74 }
75
76 test.result = test.expectedError !== test.actualError ? "fail" : "pass";
77
78 return test;
79 }
80
81 parse(test, parser) {
82 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