How to use the expect-more.isAfter function in expect-more

To help you get started, we’ve selected a few expect-more examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github JamieMason / expect-more / packages / expect-more-jest / src / to-have-date-after.ts View on Github external
export const toHaveDateAfterMatcher = (received: any, propPath: string, otherDate: Date) =>
  createResult({
    message: () => `expected ${propPath} of ${received} to be date after ${otherDate}`,
    notMessage: () => `expected ${propPath} of ${received} not to be date after ${otherDate}`,
    pass: isAfter(otherDate, getIn(propPath.split('.'), received))
  });
github JamieMason / expect-more / packages / expect-more-jest / src / to-be-after.ts View on Github external
export const toBeAfterMatcher = (received: any, other: Date) =>
  createResult({
    message: () => `expected ${received} to be an instance of Date, occurring after ${other}`,
    notMessage: () => `expected ${received} not to be an instance of Date, occurring after ${other}`,
    pass: isAfter(other, received)
  });