New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

expect-more-jest

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expect-more-jest

Write Beautiful Specs with Custom Matchers

  • 0.7.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
28K
decreased by-0.13%
Maintainers
1
Weekly downloads
 
Created
Source

expect-more-jest

Write Beautiful Specs with Custom Matchers for Jest

NPM version NPM downloads Dependency Status Build Status Code Climate Gitter Chat for expect-more Donate via PayPal Donate via Gratipay Analytics Follow JamieMason on GitHub Follow fold_left on Twitter

Status

This is a new project which needs a lot of work on documentation. It is under active development so there will likely be changes, but at its core it is a rewrite of jasmine-expect which is a mature, well-tested library.

Contributors welcome, please get in touch.

Installation

npm install expect-more-jest --save-dev

Setup

Add a setupTestFrameworkScriptFile entry to your Jest Configuration which points to a JavaScript file somewhere in your project.

{
  "setupTestFrameworkScriptFile": "<rootDir>/test/setup-test-framework-script-file.js"
}

In that file (in this example we have chosen ./test/setup-test-framework-script-file.js) include the following:

import { asymmetric, matchers } from 'expect-more-jest';

beforeEach(() => {
  // register asymmetric matchers such as expect.nonEmptyArray()
  Object.assign(expect, asymmetric);
  // register test matchers such as expect().toBeArray()
  expect.extend(matchers);
});

API

Asymmetric Matchers

Generators

Matchers

FAQs

Package last updated on 17 Dec 2017

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