How to use the expect-more.isEmptyObject 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-empty-object.ts View on Github external
export const toHaveEmptyObjectMatcher = (received: any, propPath: string) =>
  createResult({
    message: () => `expected ${propPath} of ${received} to be an empty object`,
    notMessage: () => `expected ${propPath} of ${received} not to be an empty object`,
    pass: isEmptyObject(getIn(propPath.split('.'), received))
  });
github JamieMason / expect-more / packages / expect-more-jest / src / to-be-empty-object.ts View on Github external
export const toBeEmptyObjectMatcher = (received: any) =>
  createResult({
    message: () => `expected ${received} to be an object without any own members`,
    notMessage: () => `expected ${received} not to be an object without any own members`,
    pass: isEmptyObject(received)
  });