poku
Version:
🐷 Poku makes testing easy for Node.js, Bun, Deno, and you at the same time.
22 lines (21 loc) • 672 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CheckNoOnly = exports.checkOnly = void 0;
const checkOnly = (cb) => {
if (typeof cb !== 'function')
return false;
const body = cb.toString();
return (body.includes('it.only') ||
body.includes('test.only') ||
body.includes('describe.only'));
};
exports.checkOnly = checkOnly;
const CheckNoOnly = (cb) => {
if (typeof cb !== 'function')
return false;
const body = cb.toString();
return !(body.includes('it.only') ||
body.includes('test.only') ||
body.includes('describe.only'));
};
exports.CheckNoOnly = CheckNoOnly;