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 toHaveJsonStringMatcher = (received: any, propPath: string) =>
createResult({
message: () => `expected ${propPath} of ${received} to be a string of JSON`,
notMessage: () => `expected ${propPath} of ${received} not to be a string of JSON`,
pass: isJsonString(getIn(propPath.split('.'), received))
});
export const toBeJsonStringMatcher = (received: any) =>
createResult({
message: () => `expected ${received} to be a string of valid JSON`,
notMessage: () => `expected ${received} not to be a string of valid JSON`,
pass: isJsonString(received)
});