UNPKG

only-changed-jest-watch-plugin

Version:

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

12 lines (9 loc) 275 B
'use strict'; var toString = Object.prototype.toString; module.exports = function (fn) { if (typeof fn !== 'function') { return false; } return (fn.constructor && fn.constructor.name === 'GeneratorFunction') || toString.call(fn) === '[object GeneratorFunction]'; };