Latest Supply Chain Attack:Mini Shai-Hulud Hits @antv npm Packages, 639 Versions Compromised.Learn More
Sign In

@japa/expect

Package Overview
Dependencies
Maintainers
3
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@japa/expect

Assertion package built on top of Jest expect

Source
npmnpm
Version
3.0.2
Version published
Weekly downloads
4.1K
-52.34%
Maintainers
3
Weekly downloads
 
Created
Source

@japa/expect

Assertion library built on top of jest-expect

github-actions-image npm-image license-image typescript-image

An assertion library built on top of jest-expect.

Complete API documentation

Installation

Install the package from the npm registry as follows:

npm i @japa/expect

yarn add @japa/expect

Usage

You can use the assertion package with the @japa/runner as follows.

import { expect } from '@japa/expect'
import { configure } from '@japa/runner'

configure({
  plugins: [expect()]
})

Once done, you will be able to access the expect property on the test context.

test('test title', ({ expect }) => {
  expect(100).toBeWithinRange(90, 110)
})

Keywords

expect

FAQs

Package last updated on 29 Mar 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