UNPKG

only-changed-jest-watch-plugin

Version:

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

17 lines (15 loc) 355 B
var dP = require('./_object-dp').f; var FProto = Function.prototype; var nameRE = /^\s*function ([^ (]*)/; var NAME = 'name'; // 19.2.4.2 name NAME in FProto || require('./_descriptors') && dP(FProto, NAME, { configurable: true, get: function () { try { return ('' + this).match(nameRE)[1]; } catch (e) { return ''; } } });