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 toHaveArrayOfSizeMatcher = (received: any, propPath: string, size: number) =>
createResult({
message: () => `expected ${propPath} of ${received} to be an array containing ${size} members`,
notMessage: () => `expected ${propPath} of ${received} not to be an array containing ${size} members`,
pass: isArrayOfSize(size, getIn(propPath.split('.'), received))
});
export const toBeArrayOfSizeMatcher = (received: any, size: number) =>
createResult({
message: () => `expected ${received} to be an array containing exactly ${size} items`,
notMessage: () => `expected ${received} not to be an array containing exactly ${size} items`,
pass: isArrayOfSize(size, received)
});