@defi-wonderland/keep3r-v2
Version:
The Keep3r Network is a decentralized network for projects that need external devops, and for external teams to find keeper jobs
10 lines (8 loc) • 431 B
text/typescript
import { Suite, SuiteFunction } from 'mocha';
export const then = it;
export const given = beforeEach;
export const when: SuiteFunction = <SuiteFunction>function (title: string, fn: (this: Suite) => void) {
context('when ' + title, fn);
};
when.only = (title: string, fn?: (this: Suite) => void) => context.only('when ' + title, fn!);
when.skip = (title: string, fn: (this: Suite) => void) => context.skip('when ' + title, fn);