UNPKG

jest-date

Version:

Custom jest matchers to test dates

18 lines (17 loc) 437 B
/// <reference types="jest" /> declare global { namespace jest { interface Matchers<R, T> { /** * Assert whether a date is friday or not. * @example * expect(new Date()).toBeFriday() */ toBeFriday(): R; } } } export declare function toBeFriday(this: jest.MatcherUtils, received: Date): { pass: boolean; message: () => string; };