How to use the expect-more.isCalculable 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-calculable.ts View on Github external
export const toHaveCalculableMatcher = (received: any, propPath: string) =>
  createResult({
    message: () => `expected ${propPath} of ${received} to be calculable`,
    notMessage: () => `expected ${propPath} of ${received} not to be calculable`,
    pass: isCalculable(getIn(propPath.split('.'), received))
  });
github JamieMason / expect-more / packages / expect-more-jest / src / to-be-calculable.ts View on Github external
export const toBeCalculableMatcher = (received: any) =>
  createResult({
    message: () => `expected ${received} to be coercible for use in mathemetical operations`,
    notMessage: () => `expected ${received} not to be coercible for use in mathemetical operations`,
    pass: isCalculable(received)
  });