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 monday or not. * @example * expect(new Date()).toBeMonday() */ toBeMonday(): R; } } } export declare function toBeMonday(this: jest.MatcherUtils, received: Date): { pass: boolean; message: () => string; };