only-changed-jest-watch-plugin
Version:
Jest watch plugin for running either only the modified test (for TDD), or tests of dependant modules
18 lines (14 loc) • 449 B
JavaScript
;
const parser = require("./generated-parser.js");
exports.name = function (potentialName) {
return mapResult(parser.startWith("Name").exec(potentialName));
};
exports.qname = function (potentialQname) {
return mapResult(parser.startWith("QName").exec(potentialQname));
};
function mapResult(result) {
return {
success: result.success,
error: result.error && parser.getTrace(result.error.message)
};
}