console-fail-test
Version:
Gently fails test runs if the console was used during them. 📢
25 lines • 566 B
JavaScript
const selectJestEnvironment = () => {
if (typeof afterEach === "undefined" || typeof beforeEach === "undefined" || typeof jest === "undefined") {
return void 0;
}
let afterEachCallback;
let beforeEachCallback;
afterEach(() => {
afterEachCallback?.();
});
beforeEach(() => {
beforeEachCallback?.();
});
return {
afterEach: (callback) => {
afterEachCallback = callback;
},
beforeEach: (callback) => {
beforeEachCallback = callback;
}
};
};
export {
selectJestEnvironment
};
//# sourceMappingURL=jest.js.map