UNPKG

only-changed-jest-watch-plugin

Version:

Jest watch plugin for running either only the modified test (for TDD), or tests of dependant modules

9 lines (8 loc) 234 B
module.exports = function (regExp, replace) { var replacer = replace === Object(replace) ? function (part) { return replace[part]; } : replace; return function (it) { return String(it).replace(regExp, replacer); }; };