graycoreio/daffodil

View on GitHub
tools/jasmine/src/index.ts

Summary

Maintainability
A
0 mins
Test Coverage
/* eslint-disable @typescript-eslint/no-namespace */
import { idempotenceMatcher } from './idempotence';

//jasmine
declare global {
  namespace jasmine {
    interface Matchers<T> {
      toBeIdempotent(): void;
    }
  }
}

export const setup = () => {
  jasmine.getEnv().beforeAll(() => jasmine.addMatchers({
    toBeIdempotent: idempotenceMatcher,
  }));
};