corde
Version:
A simple library for Discord bot tests
18 lines (17 loc) • 683 B
TypeScript
import { VoidLikeFunction } from "../types";
/**
* Define a single test. A test should contain one or more expectations that test action of
* the discord bot.
* A spec whose expectations all succeed will be passing and a spec with any failures will fail.
*
* @param expectationDescription Textual description of what this test is checking
* @param assertion Function that contains the code of your test. If not provided it will be ignored in the report.
* @param timeout Custom timeout for an async test
*
* @since 1.0
*/
export declare const test: <T extends unknown>(
expectationDescription: T,
assertion: VoidLikeFunction,
timeout?: number | undefined,
) => void;