Socket
Socket
Sign inDemoInstall

vitest

Package Overview
Dependencies
15
Maintainers
1
Versions
357
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.17 to 0.0.18

25

dist/index.d.ts

@@ -6,1 +6,26 @@ export * from './types';

export * from './integrations/sinon';
declare global {
namespace Chai {
interface Assertion {
toMatchSnapshot(message?: string): Assertion;
matchSnapshot(message?: string): Assertion;
toEqual(expected: any): void;
toStrictEqual(expected: any): void;
toBe(expected: any): void;
toContain(item: any): void;
toBeTruthy(): void;
toBeFalsy(): void;
toBeNaN(): void;
toBeUndefined(): void;
toBeNull(): void;
toBeDefined(): void;
toBeInstanceOf(c: any): void;
toBeCalledTimes(n: number): void;
toBeCalledOnce(): void;
toBeCalled(): void;
}
interface ExpectStatic {
addSnapshotSerializer: import('pretty-format').Plugin;
}
}
}

1

dist/index.js

@@ -0,1 +1,2 @@

/* eslint-disable @typescript-eslint/no-namespace */
export * from './types';

@@ -2,0 +3,0 @@ export * from './suite';

19

dist/integrations/chai/jest-expect.d.ts
import { ChaiPlugin } from './types';
export declare function JestChaiExpect(): ChaiPlugin;
declare global {
namespace Chai {
interface Assertion {
toEqual(expected: any): void;
toStrictEqual(expected: any): void;
toBe(expected: any): void;
toContain(item: any): void;
toBeTruthy(): void;
toBeFalsy(): void;
toBeNaN(): void;
toBeUndefined(): void;
toBeNull(): void;
toBeDefined(): void;
}
interface ExpectStatic {
addSnapshotSerializer: import('pretty-format').Plugin;
}
}
}

@@ -13,3 +13,3 @@ // Jest Expect Compact

utils.addMethod(proto, 'toBe', function (expected) {
return this.be(expected);
return this.equal(expected);
});

@@ -39,3 +39,16 @@ utils.addMethod(proto, 'toContain', function (item) {

});
utils.addMethod(proto, 'toBeInstanceOf', function (obj) {
return this.instanceOf(obj);
});
// mock
utils.addMethod(proto, 'toBeCalledTimes', function (number) {
return this.callCount(number);
});
utils.addMethod(proto, 'toBeCalledOnce', function () {
return this.callCount(1);
});
utils.addMethod(proto, 'toBeCalled', function () {
return this.called;
});
};
}

@@ -9,12 +9,1 @@ import { ChaiPlugin } from '../types';

export declare function SnapshotPlugin(options: SnapshotOptions): Promise<ChaiPlugin>;
declare global {
namespace Chai {
interface Assertion {
toMatchSnapshot(message?: string): Assertion;
matchSnapshot(message?: string): Assertion;
}
interface ExpectStatic {
addSnapshotSerializer: import('pretty-format').Plugin;
}
}
}
import sinon from 'sinon';
export { sinon };
export const { mock, spy, stub } = sinon;
// @ts-expect-error
sinon.fn = sinon.spy;
{
"name": "vitest",
"version": "0.0.17",
"version": "0.0.18",
"description": "",

@@ -5,0 +5,0 @@ "keywords": [],

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc