@averagehelper/corde
Version:
A simple library for Discord bot tests. (Republished fork to demonstrate a bugfix)
20 lines (19 loc) • 562 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.beforeEach = void 0;
const common_1 = require("../common");
/**
* Declare a bunch of code that will be executed before each test begin
*
* They will be executed following a sequence of files
* reads and the positions of each `beforeEach` call.
*
* @param fn code that will be executed **before** tests start
* @since 2.0
*/
function beforeEach(fn) {
if (fn) {
common_1.testCollector.beforeEachFunctions.enqueue(fn);
}
}
exports.beforeEach = beforeEach;