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

@vitest/expect

Package Overview
Dependencies
Maintainers
4
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vitest/expect - npm Package Compare versions

Comparing version 3.0.0-beta.1 to 3.0.0-beta.2

31

dist/index.d.ts

@@ -100,4 +100,17 @@ import { MockInstance } from '@vitest/spy';

}
interface AsymmetricMatchersContaining {
interface CustomMatcher {
/**
* Checks that a value satisfies a custom matcher function.
*
* @param matcher - A function returning a boolean based on the custom condition
* @param message - Optional custom error message on failure
*
* @example
* expect(age).toSatisfy(val => val >= 18, 'Age must be at least 18');
* expect(age).toEqual(expect.toSatisfy(val => val >= 18, 'Age must be at least 18'));
*/
toSatisfy: (matcher: (value: any) => boolean, message?: string) => any;
}
interface AsymmetricMatchersContaining extends CustomMatcher {
/**
* Matches if the received string contains the expected substring.

@@ -143,3 +156,3 @@ *

}
interface JestAssertion<T = any> extends jest.Matchers<void, T> {
interface JestAssertion<T = any> extends jest.Matchers<void, T>, CustomMatcher {
/**

@@ -564,12 +577,2 @@ * Used when you want to check that two objects have the same value.

/**
* Checks that a value satisfies a custom matcher function.
*
* @param matcher - A function returning a boolean based on the custom condition
* @param message - Optional custom error message on failure
*
* @example
* expect(age).toSatisfy(val => val >= 18, 'Age must be at least 18');
*/
toSatisfy: <E>(matcher: (value: E) => boolean, message?: string) => void;
/**
* This assertion checks if a `Mock` was called before another `Mock`.

@@ -661,2 +664,4 @@ * @param mock - A mock function created by `vi.spyOn` or `vi.fn`

declare const customMatchers: MatchersObject;
interface AsymmetricMatcherInterface {

@@ -748,2 +753,2 @@ asymmetricMatch: (other: unknown) => boolean;

export { ASYMMETRIC_MATCHERS_OBJECT, Any, Anything, ArrayContaining, type Assertion, AsymmetricMatcher, type AsymmetricMatcherInterface, type AsymmetricMatchersContaining, type AsyncExpectationResult, type ChaiPlugin, type ExpectStatic, type ExpectationResult, GLOBAL_EXPECT, JEST_MATCHERS_OBJECT, type JestAssertion, JestAsymmetricMatchers, JestChaiExpect, JestExtend, MATCHERS_OBJECT, type MatcherHintOptions, type MatcherState, type MatchersObject, ObjectContaining, type PromisifyAssertion, type RawMatcherFn, StringContaining, StringMatching, type SyncExpectationResult, type Tester, type TesterContext, addCustomEqualityTesters, arrayBufferEquality, equals, fnNameFor, generateToBeMessage, getObjectKeys, getObjectSubset, getState, hasAsymmetric, hasProperty, isA, isAsymmetric, isImmutableUnorderedKeyed, isImmutableUnorderedSet, iterableEquality, pluralize, setState, sparseArrayEquality, subsetEquality, typeEquality };
export { ASYMMETRIC_MATCHERS_OBJECT, Any, Anything, ArrayContaining, type Assertion, AsymmetricMatcher, type AsymmetricMatcherInterface, type AsymmetricMatchersContaining, type AsyncExpectationResult, type ChaiPlugin, type ExpectStatic, type ExpectationResult, GLOBAL_EXPECT, JEST_MATCHERS_OBJECT, type JestAssertion, JestAsymmetricMatchers, JestChaiExpect, JestExtend, MATCHERS_OBJECT, type MatcherHintOptions, type MatcherState, type MatchersObject, ObjectContaining, type PromisifyAssertion, type RawMatcherFn, StringContaining, StringMatching, type SyncExpectationResult, type Tester, type TesterContext, addCustomEqualityTesters, arrayBufferEquality, customMatchers, equals, fnNameFor, generateToBeMessage, getObjectKeys, getObjectSubset, getState, hasAsymmetric, hasProperty, isA, isAsymmetric, isImmutableUnorderedKeyed, isImmutableUnorderedSet, iterableEquality, pluralize, setState, sparseArrayEquality, subsetEquality, typeEquality };
{
"name": "@vitest/expect",
"type": "module",
"version": "3.0.0-beta.1",
"version": "3.0.0-beta.2",
"description": "Jest's expect matchers as a Chai plugin",

@@ -35,4 +35,4 @@ "license": "MIT",

"tinyrainbow": "^1.2.0",
"@vitest/utils": "3.0.0-beta.1",
"@vitest/spy": "3.0.0-beta.1"
"@vitest/spy": "3.0.0-beta.2",
"@vitest/utils": "3.0.0-beta.2"
},

@@ -42,3 +42,3 @@ "devDependencies": {

"rollup-plugin-copy": "^3.5.0",
"@vitest/runner": "3.0.0-beta.1"
"@vitest/runner": "3.0.0-beta.2"
},

@@ -45,0 +45,0 @@ "scripts": {

Sorry, the diff of this file is too big to display

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