vitest 0.6.0 → 0.6.1

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.
package/dist/index.d.ts CHANGED
@@ -683,6 +683,7 @@ interface TaskBase {
683
683
  interface TaskResult {
684
684
  state: TaskState;
685
685
  duration?: number;
686
+ startTime?: number;
686
687
  error?: ErrorWithDiff;
687
688
  hooks?: Partial<Record<keyof SuiteHooks, TaskState>>;
688
689
  }
@@ -1352,12 +1353,6 @@ declare module 'vite' {
1352
1353
  test?: VitestInlineConfig;
1353
1354
  }
1354
1355
  }
1355
- interface AsymmetricMatchersContaining {
1356
- stringContaining(expected: string): any;
1357
- objectContaining(expected: any): any;
1358
- arrayContaining(expected: unknown[]): any;
1359
- stringMatching(expected: string | RegExp): any;
1360
- }
1361
1356
  declare type Promisify<O> = {
1362
1357
  [K in keyof O]: O[K] extends (...args: infer A) => infer R ? O extends R ? Promisify<O[K]> : (...args: A) => Promise<R> : O[K];
1363
1358
  };
@@ -1379,6 +1374,12 @@ declare global {
1379
1374
  setState(state: Partial<MatcherState>): void;
1380
1375
  not: AsymmetricMatchersContaining;
1381
1376
  }
1377
+ interface AsymmetricMatchersContaining {
1378
+ stringContaining(expected: string): any;
1379
+ objectContaining(expected: any): any;
1380
+ arrayContaining(expected: unknown[]): any;
1381
+ stringMatching(expected: string | RegExp): any;
1382
+ }
1382
1383
  interface JestAssertion<T = any> extends jest.Matchers<void, T> {
1383
1384
  toMatchSnapshot<U extends {
1384
1385
  [P in keyof T]: any;
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- export { o as afterAll, q as afterEach, n as beforeAll, p as beforeEach, l as describe, r as expect, m as it, k as suite, t as test, v as vi, u as vitest } from './chunk-runtime-chain.d117aaa7.js';
1
+ export { o as afterAll, q as afterEach, n as beforeAll, p as beforeEach, l as describe, r as expect, m as it, k as suite, t as test, v as vi, u as vitest } from './chunk-runtime-chain.3d6b5653.js';
2
2
  export { fn, isMockFunction, spies, spyOn } from './jest-mock.js';
3
3
  export { assert, default as chai, should } from 'chai';
4
4
  import 'util';
5
- import './chunk-utils-base.a107f2b1.js';
5
+ import './chunk-utils-base.2c363063.js';
6
6
  import 'path';
7
7
  import 'tty';
8
8
  import 'local-pkg';
9
9
  import './vendor-_commonjsHelpers.edc3a5f0.js';
10
10
  import './chunk-runtime-rpc.1832c38c.js';
11
11
  import 'fs';
12
- import './chunk-utils-source-map.bc814f37.js';
12
+ import './chunk-utils-source-map.2d4c71ab.js';
13
13
  import 'tinyspy';
14
14
  //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7In0=
package/dist/node.d.ts CHANGED
@@ -450,6 +450,7 @@ interface TaskBase {
450
450
  interface TaskResult {
451
451
  state: TaskState;
452
452
  duration?: number;
453
+ startTime?: number;
453
454
  error?: ErrorWithDiff;
454
455
  hooks?: Partial<Record<keyof SuiteHooks, TaskState>>;
455
456
  }
package/dist/node.js CHANGED
@@ -1,4 +1,4 @@
1
- export { V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-vite-node-externalize.feaddbac.js';
1
+ export { V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-vite-node-externalize.5b9aed30.js';
2
2
  import 'buffer';
3
3
  import 'path';
4
4
  import 'child_process';
@@ -12,17 +12,17 @@ import 'assert';
12
12
  import 'events';
13
13
  import 'url';
14
14
  import 'os';
15
- import './chunk-utils-base.a107f2b1.js';
15
+ import './chunk-utils-base.2c363063.js';
16
16
  import 'tty';
17
17
  import 'local-pkg';
18
18
  import 'vite';
19
- import './chunk-constants.a82c3238.js';
20
- import './chunk-vite-node-utils.4a2f9073.js';
19
+ import './chunk-constants.5cf7e54e.js';
20
+ import './chunk-vite-node-utils.61fb6891.js';
21
21
  import 'module';
22
22
  import 'vm';
23
- import './chunk-defaults.8d4c2fa4.js';
23
+ import './chunk-defaults.52b18365.js';
24
24
  import 'perf_hooks';
25
- import './chunk-utils-source-map.bc814f37.js';
25
+ import './chunk-utils-source-map.2d4c71ab.js';
26
26
  import 'worker_threads';
27
27
  import 'tinypool';
28
28
  import './chunk-magic-string.d5e0e473.js';
package/dist/worker.js CHANGED
@@ -1,6 +1,6 @@
1
- import { w as isWindows, x as mergeSlashes, h as dirname, j as basename, q as resolve } from './chunk-utils-base.a107f2b1.js';
2
- import { i as isNodeBuiltin, t as toFilePath, V as ViteNodeRunner, c as createBirpc } from './chunk-vite-node-utils.4a2f9073.js';
3
- import { d as distDir } from './chunk-constants.a82c3238.js';
1
+ import { x as isWindows, y as mergeSlashes, h as dirname, j as basename, q as resolve } from './chunk-utils-base.2c363063.js';
2
+ import { i as isNodeBuiltin, t as toFilePath, V as ViteNodeRunner, c as createBirpc } from './chunk-vite-node-utils.61fb6891.js';
3
+ import { d as distDir } from './chunk-constants.5cf7e54e.js';
4
4
  import { normalizePath } from 'vite';
5
5
  import { existsSync, readdirSync } from 'fs';
6
6
  import { r as rpc } from './chunk-runtime-rpc.1832c38c.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vitest",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "A blazing fast unit test framework powered by Vite",
5
5
  "keywords": [
6
6
  "vite",
@@ -12,14 +12,20 @@
12
12
  "bugs": {
13
13
  "url": "https://github.com/vitest-dev/vitest/issues"
14
14
  },
15
+ "license": "MIT",
15
16
  "repository": {
16
17
  "type": "git",
17
18
  "url": "git+https://github.com/vitest-dev/vitest.git"
18
19
  },
19
20
  "funding": "https://github.com/sponsors/antfu",
20
- "license": "MIT",
21
21
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
22
22
  "type": "module",
23
+ "files": [
24
+ "dist",
25
+ "bin",
26
+ "*.d.ts",
27
+ "*.mjs"
28
+ ],
23
29
  "exports": {
24
30
  ".": {
25
31
  "import": "./dist/index.js",
@@ -51,12 +57,26 @@
51
57
  "bin": {
52
58
  "vitest": "./vitest.mjs"
53
59
  },
54
- "files": [
55
- "dist",
56
- "bin",
57
- "*.d.ts",
58
- "*.mjs"
59
- ],
60
+ "peerDependencies": {
61
+ "@vitest/ui": "*",
62
+ "c8": "*",
63
+ "happy-dom": "*",
64
+ "jsdom": "*"
65
+ },
66
+ "peerDependenciesMeta": {
67
+ "@vitest/ui": {
68
+ "optional": true
69
+ },
70
+ "c8": {
71
+ "optional": true
72
+ },
73
+ "happy-dom": {
74
+ "optional": true
75
+ },
76
+ "jsdom": {
77
+ "optional": true
78
+ }
79
+ },
60
80
  "dependencies": {
61
81
  "@types/chai": "^4.3.0",
62
82
  "@types/chai-subset": "^1.3.3",
@@ -76,7 +96,7 @@
76
96
  "@types/node": "^17.0.21",
77
97
  "@types/prompts": "^2.4.0",
78
98
  "@types/sinonjs__fake-timers": "^8.1.1",
79
- "@vitest/ui": "0.6.0",
99
+ "@vitest/ui": "0.6.1",
80
100
  "birpc": "^0.1.0",
81
101
  "c8": "^7.11.0",
82
102
  "cac": "^6.7.12",
@@ -87,7 +107,7 @@
87
107
  "fast-glob": "^3.2.11",
88
108
  "find-up": "^6.3.0",
89
109
  "flatted": "^3.2.5",
90
- "happy-dom": "^2.45.1",
110
+ "happy-dom": "^2.46.3",
91
111
  "jsdom": "^19.0.0",
92
112
  "log-update": "^5.0.0",
93
113
  "magic-string": "^0.26.1",
@@ -104,29 +124,9 @@
104
124
  "source-map-js": "^1.0.2",
105
125
  "strip-ansi": "^7.0.1",
106
126
  "typescript": "^4.6.2",
107
- "vite-node": "0.6.0",
127
+ "vite-node": "0.6.1",
108
128
  "ws": "^8.5.0"
109
129
  },
110
- "peerDependencies": {
111
- "@vitest/ui": "*",
112
- "c8": "*",
113
- "happy-dom": "*",
114
- "jsdom": "*"
115
- },
116
- "peerDependenciesMeta": {
117
- "@vitest/ui": {
118
- "optional": true
119
- },
120
- "c8": {
121
- "optional": true
122
- },
123
- "happy-dom": {
124
- "optional": true
125
- },
126
- "jsdom": {
127
- "optional": true
128
- }
129
- },
130
130
  "engines": {
131
131
  "node": ">=14.14.0"
132
132
  },