Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jest-fp-ts-matchers

Package Overview
Dependencies
Maintainers
0
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-fp-ts-matchers

Collection of monad matchers to ease testing with Jest

  • 0.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
661
increased by0.76%
Maintainers
0
Weekly downloads
 
Created
Source

jest-fp-ts-matchers

Collection of monad matchers to ease testing with Jest

Installation

npm install -D jest-fp-ts-matchers

Quick start

import { expectLeftEither } from 'jest-fp-ts-matchers';

test('returns left Either when parsing fails', () => {
  pipe(
    Parser.parse({ id: '' }),
    expectLeftEither((err) => {
      expect(err).toBeInstanceOf(Error);
      expect(err.message).toMatch(/001/);
    })
  );
});

Exported methods

  • expectLeftEither
  • expectRightEither
  • expectLeftΙΟEither
  • expectRightΙΟEither
  • expectLeftTaskEither
  • expectRightTaskEither
  • expectLeftReaderTaskEither
  • expectRightReaderTaskEither
  • expectSomeOption
  • expectNoneOption
Requirements
  • Node.js v.16+

License

MIT

Keywords

FAQs

Package last updated on 15 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc