JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 31150
  • Score
    100M100P100Q156538F
  • License MIT

Extend jest to assert arrays with approximate values

Package Exports

  • jest-matcher-deep-close-to

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (jest-matcher-deep-close-to) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

jest-matcher-deep-close-to

NPM version build status Test coverage npm download

Extend jest to assert arrays with approximate values.

Installation

$ npm install --save jest-matcher-deep-close-to

Usage

import {toBeDeepCloseTo} from 'jest-matcher-deep-close-to';
expect.extend({toBeDeepCloseTo});

describe('test myModule', () => {
    it('should return 42', () => {
        expect([42.0003]).toBeDeepCloseTo([42.0004], 3);
    });
});

License

MIT