You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@jest/expect

Package Overview
Dependencies
Maintainers
5
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jest/expect - npm Package Compare versions

Comparing version
30.2.0
to
30.3.0
+4
-4
package.json
{
"name": "@jest/expect",
"version": "30.2.0",
"version": "30.3.0",
"repository": {

@@ -22,4 +22,4 @@ "type": "git",

"dependencies": {
"expect": "30.2.0",
"jest-snapshot": "30.2.0"
"expect": "30.3.0",
"jest-snapshot": "30.3.0"
},

@@ -32,3 +32,3 @@ "engines": {

},
"gitHead": "855864e3f9751366455246790be2bf912d4d0dac"
"gitHead": "efb59c2e81083f8dc941f20d6d20a3af2dc8d068"
}
import { AsymmetricMatchers, AsymmetricMatchers as AsymmetricMatchers$1, BaseExpect, MatcherContext, MatcherFunction, MatcherFunctionWithContext, MatcherState, MatcherUtils, Matchers, Matchers as Matchers$1 } from "expect";
import { SnapshotMatchers, SnapshotState, addSerializer } from "jest-snapshot";
//#region src/types.d.ts
type JestExpect = {
<T = unknown>(actual: T): JestMatchers<void, T> & Inverse<JestMatchers<void, T>> & PromiseMatchers<T>;
addSnapshotSerializer: typeof addSerializer;
} & BaseExpect & AsymmetricMatchers$1 & Inverse<Omit<AsymmetricMatchers$1, 'any' | 'anything'>>;
type Inverse<Matchers> = {
/**
* Inverse next matcher. If you know how to test something, `.not` lets you test its opposite.
*/
not: Matchers$1;
};
type JestMatchers<R extends void | Promise<void>, T> = Matchers$1<R, T> & SnapshotMatchers<R, T>;
type PromiseMatchers<T = unknown> = {
/**
* Unwraps the reason of a rejected promise so any other matcher can be chained.
* If the promise is fulfilled the assertion fails.
*/
rejects: JestMatchers<Promise<void>, T> & Inverse<JestMatchers<Promise<void>, T>>;
/**
* Unwraps the value of a fulfilled promise so any other matcher can be chained.
* If the promise is rejected the assertion fails.
*/
resolves: JestMatchers<Promise<void>, T> & Inverse<JestMatchers<Promise<void>, T>>;
};
declare module 'expect' {
interface MatcherState {
snapshotState: SnapshotState;
/** Whether the test was called with `test.failing()` */
testFailing?: boolean;
}
interface BaseExpect {
addSnapshotSerializer: typeof addSerializer;
}
}
//#endregion
//#region src/index.d.ts
declare const jestExpect: JestExpect;
//#endregion
export { AsymmetricMatchers, JestExpect, MatcherContext, MatcherFunction, MatcherFunctionWithContext, MatcherState, MatcherUtils, Matchers, jestExpect };