Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const toHaveDateBeforeMatcher = (received: any, propPath: string, otherDate: Date) =>
createResult({
message: () => `expected ${propPath} of ${received} to be date before ${otherDate}`,
notMessage: () => `expected ${propPath} of ${received} not to be date before ${otherDate}`,
pass: isBefore(otherDate, getIn(propPath.split('.'), received))
});
export const toBeBeforeMatcher = (received: any, other: Date) =>
createResult({
message: () => `expected ${received} to be an instance of Date, occurring before ${other}`,
notMessage: () => `expected ${received} not to be an instance of Date, occurring before ${other}`,
pass: isBefore(other, received)
});