@averagehelper/corde
Version:
A simple library for Discord bot tests. (Republished fork to demonstrate a bugfix)
21 lines (20 loc) • 618 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.afterEach = void 0;
const common_1 = require("../common");
/**
* Declare a bunch of code that will be executed **after each** test.
*
* More than one declaration of this code results in a list
* of functions to run, following a sequence of files
* reads and the positions of each `afterEach` call.
*
* @param fn code that will be executed **after each** tests finish
* @since 2.0
*/
function afterEach(fn) {
if (fn) {
common_1.testCollector.afterEachFunctions.enqueue(fn);
}
}
exports.afterEach = afterEach;