🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

@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

latest
Source
npmnpm
Version
3.0.7
Version published
Maintainers
3
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 13 Dec 2025

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