UNPKG

corde

Version:

A simple library for Discord bot tests

25 lines (24 loc) 764 B
/** * Declare a bunch of code that will be executed **after** tests begin * * More than one declaration of this code results in a list * of functions to run. * * They will be executed following a sequence of files * reads and the positions of each `afterAll` call. * * @example * // The main function of this is to start a bot if you haven't started it yet * * const bot = new Discord.Client(); * afterAll(() => { * bot.destroy(); * }); * * @param fn Code that will be executed **after** tests start * @param timeout Time that Corde should wait for the execution of this function. * **it overrides the timeout defined in configs**. * * @since 1.0 */ export declare function afterAll(fn: () => void | Promise<void>, timeout?: number): void;