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
101
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 2.0.1 to 2.0.2

16

dist/index.d.ts

@@ -1,15 +0,13 @@

import * as _vitest_utils from '@vitest/utils';
import * as tinyrainbow from 'tinyrainbow';
import { Formatter } from 'tinyrainbow';
import { stringify, Constructable } from '@vitest/utils';
export { setupColors } from '@vitest/utils';
import { diff } from '@vitest/utils/diff';
export { DiffOptions } from '@vitest/utils/diff';
type Formatter = (input: string | number | null | undefined) => string;
declare function getMatcherUtils(): {
EXPECTED_COLOR: _vitest_utils.ColorMethod;
RECEIVED_COLOR: _vitest_utils.ColorMethod;
INVERTED_COLOR: _vitest_utils.ColorMethod;
BOLD_WEIGHT: _vitest_utils.ColorMethod;
DIM_COLOR: _vitest_utils.ColorMethod;
EXPECTED_COLOR: tinyrainbow.Formatter;
RECEIVED_COLOR: tinyrainbow.Formatter;
INVERTED_COLOR: tinyrainbow.Formatter;
BOLD_WEIGHT: tinyrainbow.Formatter;
DIM_COLOR: tinyrainbow.Formatter;
matcherHint: (matcherName: string, received?: string, expected?: string, options?: MatcherHintOptions) => string;

@@ -16,0 +14,0 @@ printReceived: (object: unknown) => string;

@@ -1,3 +0,3 @@

import { getType, getColors, stringify, isObject, assertTypes } from '@vitest/utils';
export { setupColors } from '@vitest/utils';
import { getType, stringify, isObject, assertTypes } from '@vitest/utils';
import c from 'tinyrainbow';
import { diff } from '@vitest/utils/diff';

@@ -46,8 +46,7 @@ import { isMockFunction } from '@vitest/spy';

function getMatcherUtils() {
const c = () => getColors();
const EXPECTED_COLOR = c().green;
const RECEIVED_COLOR = c().red;
const INVERTED_COLOR = c().inverse;
const BOLD_WEIGHT = c().bold;
const DIM_COLOR = c().dim;
const EXPECTED_COLOR = c.green;
const RECEIVED_COLOR = c.red;
const INVERTED_COLOR = c.inverse;
const BOLD_WEIGHT = c.bold;
const DIM_COLOR = c.dim;
function matcherHint(matcherName, received = "received", expected = "expected", options = {}) {

@@ -933,3 +932,2 @@ const {

const { AssertionError } = chai;
const c = () => getColors();
const customTesters = getCustomEqualityTesters();

@@ -1342,3 +1340,3 @@ function def(name, fn) {

if (spy.mock.calls) {
msg += c().gray(
msg += c.gray(
`

@@ -1349,3 +1347,3 @@

${spy.mock.calls.map((callArg, i) => {
let methodCall = c().bold(
let methodCall = c.bold(
` ${ordinalOf(i + 1)} ${spy.getMockName()} call:

@@ -1367,6 +1365,6 @@

}
msg += c().gray(
msg += c.gray(
`
Number of calls: ${c().bold(spy.mock.calls.length)}
Number of calls: ${c.bold(spy.mock.calls.length)}
`

@@ -1377,3 +1375,3 @@ );

const formatReturns = (spy, results, msg, showActualReturn) => {
msg += c().gray(
msg += c.gray(
`

@@ -1384,3 +1382,3 @@

${results.map((callReturn, i) => {
let methodCall = c().bold(
let methodCall = c.bold(
` ${ordinalOf(i + 1)} ${spy.getMockName()} call return:

@@ -1401,6 +1399,6 @@

);
msg += c().gray(
msg += c.gray(
`
Number of calls: ${c().bold(spy.mock.calls.length)}
Number of calls: ${c.bold(spy.mock.calls.length)}
`

@@ -1407,0 +1405,0 @@ );

{
"name": "@vitest/expect",
"type": "module",
"version": "2.0.1",
"version": "2.0.2",
"description": "Jest's expect matchers as a Chai plugin",

@@ -34,10 +34,10 @@ "license": "MIT",

"chai": "^5.1.1",
"@vitest/spy": "2.0.1",
"@vitest/utils": "2.0.1"
"tinyrainbow": "^1.2.0",
"@vitest/spy": "2.0.2",
"@vitest/utils": "2.0.2"
},
"devDependencies": {
"@types/chai": "4.3.6",
"picocolors": "^1.0.1",
"rollup-plugin-copy": "^3.5.0",
"@vitest/runner": "2.0.1"
"@vitest/runner": "2.0.2"
},

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

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