JamieMason/Jasmine-Matchers

View on GitHub
src/toBeCalculable.ts

Summary

Maintainability
A
0 mins
Test Coverage
export type ToBeCalculable = (expectationFailOutput?: any) => boolean;

declare global {
  namespace jasmine {
    interface Matchers<T> {
      toBeCalculable: ToBeCalculable;
    }
  }
}

export function toBeCalculable(actual) {
  return !isNaN(actual * 2);
}