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 toHaveIso8601Matcher = (received: any, propPath: string) =>
createResult({
message: () => `expected ${propPath} of ${received} to be ISO 8601 date string`,
notMessage: () => `expected ${propPath} of ${received} not to be ISO 8601 date string`,
pass: isIso8601(getIn(propPath.split('.'), received))
});
export const toBeIso8601Matcher = (received: any) =>
createResult({
message: () => `expected ${received} to be a valid ISO 8601 date string`,
notMessage: () => `expected ${received} not to be a valid ISO 8601 date string`,
pass: isIso8601(received)
});