vitest 0.0.121 → 0.0.122

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  import { g as globalApis } from './constants-22bbd600.js';
2
- import { i as index } from './index-32bc2073.js';
2
+ import { i as index } from './index-3cd686b2.js';
3
3
  import 'url';
4
4
  import './index-090545ef.js';
5
5
  import 'tty';
6
6
  import 'local-pkg';
7
7
  import 'path';
8
- import './vi-db2bc738.js';
8
+ import './vi-c99184a5.js';
9
9
  import './_commonjsHelpers-c9e3b764.js';
10
10
  import './jest-mock-038a01b3.js';
11
11
  import 'chai';
@@ -1,4 +1,4 @@
1
- import { g as getCurrentSuite, w as withTimeout, a as getDefaultHookTimeout, b as getState, s as setState, c as suite, t as test, d as describe, i as it, v as vitest, e as vi } from './vi-db2bc738.js';
1
+ import { g as getCurrentSuite, w as withTimeout, a as getDefaultHookTimeout, b as getState, s as setState, c as suite, t as test, d as describe, i as it, v as vitest, e as vi } from './vi-c99184a5.js';
2
2
  import chai, { assert, should } from 'chai';
3
3
  import { s as spies, a as spyOn, f as fn } from './jest-mock-038a01b3.js';
4
4
 
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
+ import { OptionsReceived, Plugin } from 'pretty-format';
1
2
  import { Formatter } from 'picocolors/types';
2
3
  import { ViteDevServer } from 'vite';
3
4
  import { RawSourceMap } from 'source-map-js';
4
- import { OptionsReceived } from 'pretty-format';
5
5
  import { MessagePort } from 'worker_threads';
6
6
  import { SpyImpl } from 'tinyspy';
7
7
  export { Spy, SpyFn } from 'tinyspy';
@@ -912,56 +912,59 @@ declare global {
912
912
  hasAssertions(): void;
913
913
  anything(): Anything;
914
914
  any(constructor: unknown): Any;
915
+ addSnapshotSerializer(plugin: Plugin): void;
915
916
  not: AsymmetricMatchersContaining;
916
917
  }
917
- interface JestAssertions<T = void> {
918
- toMatchSnapshot(message?: string): T;
919
- toMatchInlineSnapshot(snapshot?: string, message?: string): T;
920
- matchSnapshot(message?: string): T;
921
- toEqual(expected: any): T;
922
- toStrictEqual(expected: any): T;
923
- toBe(expected: any): T;
924
- toMatch(expected: string | RegExp): T;
925
- toMatchObject(expected: any): T;
926
- toContain(item: any): T;
927
- toContainEqual(item: any): T;
928
- toBeTruthy(): T;
929
- toBeFalsy(): T;
930
- toBeGreaterThan(num: number): T;
931
- toBeGreaterThanOrEqual(num: number): T;
932
- toBeLessThan(num: number): T;
933
- toBeLessThanOrEqual(num: number): T;
934
- toBeNaN(): T;
935
- toBeUndefined(): T;
936
- toBeNull(): T;
937
- toBeDefined(): T;
938
- toBeInstanceOf(c: any): T;
939
- toBeCalledTimes(n: number): T;
940
- toHaveLength(l: number): T;
941
- toHaveProperty(p: string, value?: any): T;
942
- toBeCloseTo(number: number, numDigits?: number): T;
943
- toHaveBeenCalledTimes(n: number): T;
944
- toHaveBeenCalledOnce(): T;
945
- toHaveBeenCalled(): T;
946
- toBeCalled(): T;
947
- toHaveBeenCalledWith(...args: any[]): T;
948
- toBeCalledWith(...args: any[]): T;
949
- toHaveBeenNthCalledWith(n: number, ...args: any[]): T;
950
- nthCalledWith(n: number, ...args: any[]): T;
951
- toHaveBeenLastCalledWith(...args: any[]): T;
952
- lastCalledWith(...args: any[]): T;
953
- toThrow(expected?: string | RegExp): T;
954
- toThrowError(expected?: string | RegExp): T;
955
- toReturn(): T;
956
- toHaveReturned(): T;
957
- toReturnTimes(times: number): T;
958
- toHaveReturnedTimes(times: number): T;
959
- toReturnWith(value: any): T;
960
- toHaveReturnedWith(value: any): T;
961
- toHaveLastReturnedWith(value: any): T;
962
- lastReturnedWith(value: any): T;
963
- toHaveNthReturnedWith(nthCall: number, value: any): T;
964
- nthReturnedWith(nthCall: number, value: any): T;
918
+ interface JestAssertions {
919
+ toMatchSnapshot(message?: string): void;
920
+ toMatchInlineSnapshot(snapshot?: string, message?: string): void;
921
+ toThrowErrorMatchingSnapshot(message?: string): void;
922
+ toThrowErrorMatchingInlineSnapshot(snapshot?: string, message?: string): void;
923
+ matchSnapshot(message?: string): void;
924
+ toEqual(expected: any): void;
925
+ toStrictEqual(expected: any): void;
926
+ toBe(expected: any): void;
927
+ toMatch(expected: string | RegExp): void;
928
+ toMatchObject(expected: any): void;
929
+ toContain(item: any): void;
930
+ toContainEqual(item: any): void;
931
+ toBeTruthy(): void;
932
+ toBeFalsy(): void;
933
+ toBeGreaterThan(num: number): void;
934
+ toBeGreaterThanOrEqual(num: number): void;
935
+ toBeLessThan(num: number): void;
936
+ toBeLessThanOrEqual(num: number): void;
937
+ toBeNaN(): void;
938
+ toBeUndefined(): void;
939
+ toBeNull(): void;
940
+ toBeDefined(): void;
941
+ toBeInstanceOf(c: any): void;
942
+ toBeCalledTimes(n: number): void;
943
+ toHaveLength(l: number): void;
944
+ toHaveProperty(p: string, value?: any): void;
945
+ toBeCloseTo(number: number, numDigits?: number): void;
946
+ toHaveBeenCalledTimes(n: number): void;
947
+ toHaveBeenCalledOnce(): void;
948
+ toHaveBeenCalled(): void;
949
+ toBeCalled(): void;
950
+ toHaveBeenCalledWith(...args: any[]): void;
951
+ toBeCalledWith(...args: any[]): void;
952
+ toHaveBeenNthCalledWith(n: number, ...args: any[]): void;
953
+ nthCalledWith(n: number, ...args: any[]): void;
954
+ toHaveBeenLastCalledWith(...args: any[]): void;
955
+ lastCalledWith(...args: any[]): void;
956
+ toThrow(expected?: string | RegExp): void;
957
+ toThrowError(expected?: string | RegExp): void;
958
+ toReturn(): void;
959
+ toHaveReturned(): void;
960
+ toReturnTimes(times: number): void;
961
+ toHaveReturnedTimes(times: number): void;
962
+ toReturnWith(value: any): void;
963
+ toHaveReturnedWith(value: any): void;
964
+ toHaveLastReturnedWith(value: any): void;
965
+ lastReturnedWith(value: any): void;
966
+ toHaveNthReturnedWith(nthCall: number, value: any): void;
967
+ nthReturnedWith(nthCall: number, value: any): void;
965
968
  }
966
969
  type Promisify<O> = {
967
970
  [K in keyof O]: O[K] extends (...args: infer A) => infer R ? O extends R ? Promisify<O[K]> : (...args: A) => Promise<R> : O[K];
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- export { d as describe, i as it, c as suite, t as test, e as vi, v as vitest } from './vi-db2bc738.js';
2
- export { a as afterAll, d as afterEach, b as beforeAll, c as beforeEach, e as expect } from './index-32bc2073.js';
1
+ export { d as describe, i as it, c as suite, t as test, e as vi, v as vitest } from './vi-c99184a5.js';
2
+ export { a as afterAll, d as afterEach, b as beforeAll, c as beforeEach, e as expect } from './index-3cd686b2.js';
3
3
  export { f as fn, s as spies, a as spyOn } from './jest-mock-038a01b3.js';
4
4
  export { assert, default as chai, should } from 'chai';
5
5
  import './index-090545ef.js';