vitest 0.9.3 → 0.9.4

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,7 +1,7 @@
1
1
  import { builtinModules, createRequire } from 'module';
2
2
  import { pathToFileURL, fileURLToPath as fileURLToPath$2, URL as URL$1 } from 'url';
3
3
  import vm from 'vm';
4
- import { l as isAbsolute$2, w as resolve, j as join$2, A as extname$2, k as dirname$2 } from './chunk-utils-global.46331799.js';
4
+ import { l as isAbsolute$2, w as resolve, j as join$2, A as extname$2, k as dirname$2 } from './chunk-utils-global.a3293dce.js';
5
5
  import path from 'path';
6
6
  import fs, { realpathSync, statSync, Stats, promises, existsSync } from 'fs';
7
7
  import assert from 'assert';
package/dist/cli.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import { EventEmitter } from 'events';
2
- import { e as c } from './chunk-utils-global.46331799.js';
3
- import { v as version, s as startVitest, d as divider } from './chunk-vite-node-externalize.9aaddc2d.js';
2
+ import { e as c } from './chunk-utils-global.a3293dce.js';
3
+ import { v as version, s as startVitest, d as divider } from './chunk-vite-node-externalize.1c19fc5e.js';
4
4
  import 'path';
5
5
  import 'tty';
6
6
  import 'local-pkg';
7
7
  import 'buffer';
8
8
  import 'child_process';
9
9
  import 'process';
10
- import './vendor-index.87b2fc14.js';
10
+ import './vendor-index.bd255bc8.js';
11
11
  import './vendor-_commonjsHelpers.34b404ce.js';
12
12
  import 'fs';
13
13
  import 'assert';
@@ -16,14 +16,14 @@ import 'util';
16
16
  import 'url';
17
17
  import 'os';
18
18
  import 'vite';
19
- import './chunk-constants.a6ce1057.js';
19
+ import './chunk-constants.c8f1d38c.js';
20
20
  import 'readline';
21
- import './chunk-vite-node-utils.3400d522.js';
21
+ import './chunk-vite-node-utils.b4debb0b.js';
22
22
  import 'module';
23
23
  import 'vm';
24
- import './chunk-defaults.aecec9d4.js';
24
+ import './chunk-defaults.43e746f3.js';
25
25
  import 'perf_hooks';
26
- import './chunk-utils-timers.6cfeb494.js';
26
+ import './chunk-utils-timers.b26e7c5c.js';
27
27
  import 'worker_threads';
28
28
  import 'tinypool';
29
29
  import './chunk-magic-string.d5e0e473.js';
package/dist/entry.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { promises } from 'fs';
2
- import { g as getWorkerState, t as toArray, m as relative, D as partitionSuiteChildren, E as hasTests, q as hasFailed, p as getFullName, r as resetModules } from './chunk-utils-global.46331799.js';
2
+ import { g as getWorkerState, t as toArray, m as relative, D as partitionSuiteChildren, E as hasTests, q as hasFailed, p as getFullName, r as resetModules } from './chunk-utils-global.a3293dce.js';
3
3
  import { Console } from 'console';
4
4
  import { Writable } from 'stream';
5
5
  import { importModule } from 'local-pkg';
6
- import { r as resetRunOnceCounter, i as index, R as RealDate, c as clearContext, d as defaultSuite, s as setHooks, g as getHooks, a as context, b as getSnapshotClient, e as setState, f as getFn, h as getState, v as vi } from './chunk-runtime-chain.e17b859e.js';
7
- import { r as rpc } from './chunk-runtime-rpc.9e81f15b.js';
8
- import { c as clearTimeout, s as setTimeout, d as stringify } from './chunk-utils-timers.6cfeb494.js';
9
- import { t as takeCoverage } from './chunk-defaults.aecec9d4.js';
6
+ import { r as resetRunOnceCounter, i as index, R as RealDate, c as clearContext, d as defaultSuite, s as setHooks, g as getHooks, a as context, b as getSnapshotClient, e as setState, f as getFn, h as getState, v as vi } from './chunk-runtime-chain.701cffd8.js';
7
+ import { r as rpc } from './chunk-runtime-rpc.c47f2233.js';
8
+ import { c as clearTimeout, s as setTimeout, d as stringify } from './chunk-utils-timers.b26e7c5c.js';
9
+ import { t as takeCoverage } from './chunk-defaults.43e746f3.js';
10
10
  import { createHash } from 'crypto';
11
11
  import { format } from 'util';
12
12
  import 'path';
@@ -402,7 +402,7 @@ async function setupGlobalEnv(config) {
402
402
  globalSetup = true;
403
403
  setupConsoleLogSpy();
404
404
  if (config.globals)
405
- (await import('./chunk-integrations-globals.5686bfb8.js')).registerApiGlobally();
405
+ (await import('./chunk-integrations-globals.b4a20711.js')).registerApiGlobally();
406
406
  }
407
407
  function setupDefines(defines) {
408
408
  for (const key in defines)
package/dist/index.d.ts CHANGED
@@ -1501,6 +1501,7 @@ declare global {
1501
1501
  lastReturnedWith<E>(value: E): void;
1502
1502
  toHaveNthReturnedWith<E>(nthCall: number, value: E): void;
1503
1503
  nthReturnedWith<E>(nthCall: number, value: E): void;
1504
+ toSatisfy<E>(matcher: (value: E) => boolean, message?: string): void;
1504
1505
  }
1505
1506
  type VitestAssertion<A, T> = {
1506
1507
  [K in keyof A]: A[K] extends Chai.Assertion ? Assertion<T> : A[K] extends (...args: any[]) => any ? A[K] : VitestAssertion<A[K], T>;
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
- export { p as afterAll, u as afterEach, o as beforeAll, q as beforeEach, k as describe, w as expect, y as getRunningMode, n as isFirstRun, z as isWatchMode, l as it, m as runOnce, j as suite, t as test, v as vi, x as vitest } from './chunk-runtime-chain.e17b859e.js';
1
+ export { p as afterAll, u as afterEach, o as beforeAll, q as beforeEach, k as describe, w as expect, y as getRunningMode, n as isFirstRun, z as isWatchMode, l as it, m as runOnce, j as suite, t as test, v as vi, x as vitest } from './chunk-runtime-chain.701cffd8.js';
2
2
  export { assert, default as chai, should } from 'chai';
3
3
  import 'util';
4
- import './chunk-utils-global.46331799.js';
4
+ import './chunk-utils-global.a3293dce.js';
5
5
  import 'path';
6
6
  import 'tty';
7
7
  import 'local-pkg';
8
- import './chunk-utils-timers.6cfeb494.js';
8
+ import './chunk-utils-timers.b26e7c5c.js';
9
9
  import './vendor-_commonjsHelpers.34b404ce.js';
10
- import './chunk-runtime-rpc.9e81f15b.js';
10
+ import './chunk-runtime-rpc.c47f2233.js';
11
11
  import 'fs';
12
12
  import './spy.js';
13
13
  import 'tinyspy';
package/dist/node.js CHANGED
@@ -1,10 +1,10 @@
1
- export { V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-vite-node-externalize.9aaddc2d.js';
2
- export { V as VitestRunner } from './chunk-runtime-mocker.d325f149.js';
1
+ export { V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-vite-node-externalize.1c19fc5e.js';
2
+ export { V as VitestRunner } from './chunk-runtime-mocker.e802beae.js';
3
3
  import 'buffer';
4
4
  import 'path';
5
5
  import 'child_process';
6
6
  import 'process';
7
- import './vendor-index.87b2fc14.js';
7
+ import './vendor-index.bd255bc8.js';
8
8
  import './vendor-_commonjsHelpers.34b404ce.js';
9
9
  import 'fs';
10
10
  import 'assert';
@@ -13,18 +13,18 @@ import 'stream';
13
13
  import 'util';
14
14
  import 'url';
15
15
  import 'os';
16
- import './chunk-utils-global.46331799.js';
16
+ import './chunk-utils-global.a3293dce.js';
17
17
  import 'tty';
18
18
  import 'local-pkg';
19
19
  import 'vite';
20
- import './chunk-constants.a6ce1057.js';
20
+ import './chunk-constants.c8f1d38c.js';
21
21
  import 'readline';
22
- import './chunk-vite-node-utils.3400d522.js';
22
+ import './chunk-vite-node-utils.b4debb0b.js';
23
23
  import 'module';
24
24
  import 'vm';
25
- import './chunk-defaults.aecec9d4.js';
25
+ import './chunk-defaults.43e746f3.js';
26
26
  import 'perf_hooks';
27
- import './chunk-utils-timers.6cfeb494.js';
27
+ import './chunk-utils-timers.b26e7c5c.js';
28
28
  import 'worker_threads';
29
29
  import 'tinypool';
30
30
  import './chunk-magic-string.d5e0e473.js';
@@ -623,7 +623,7 @@ crossSpawn$1.exports._enoent = enoent;
623
623
 
624
624
  var crossSpawn = crossSpawn$1.exports;
625
625
 
626
- var signalExit = {exports: {}};
626
+ var signalExit$1 = {exports: {}};
627
627
 
628
628
  var signals$1 = {exports: {}};
629
629
 
@@ -704,7 +704,7 @@ const processOk = function (process) {
704
704
  // some kind of non-node environment, just no-op
705
705
  /* istanbul ignore if */
706
706
  if (!processOk(process$1)) {
707
- signalExit.exports = function () {
707
+ signalExit$1.exports = function () {
708
708
  return function () {}
709
709
  };
710
710
  } else {
@@ -736,7 +736,7 @@ if (!processOk(process$1)) {
736
736
  emitter.infinite = true;
737
737
  }
738
738
 
739
- signalExit.exports = function (cb, opts) {
739
+ signalExit$1.exports = function (cb, opts) {
740
740
  /* istanbul ignore if */
741
741
  if (!processOk(commonjsGlobal.process)) {
742
742
  return function () {}
@@ -779,7 +779,7 @@ if (!processOk(process$1)) {
779
779
  process$1.reallyExit = originalProcessReallyExit;
780
780
  emitter.count -= 1;
781
781
  };
782
- signalExit.exports.unload = unload;
782
+ signalExit$1.exports.unload = unload;
783
783
 
784
784
  var emit = function emit (event, code, signal) {
785
785
  /* istanbul ignore if */
@@ -820,7 +820,7 @@ if (!processOk(process$1)) {
820
820
  };
821
821
  });
822
822
 
823
- signalExit.exports.signals = function () {
823
+ signalExit$1.exports.signals = function () {
824
824
  return signals
825
825
  };
826
826
 
@@ -850,7 +850,7 @@ if (!processOk(process$1)) {
850
850
  process$1.emit = processEmit;
851
851
  process$1.reallyExit = processReallyExit;
852
852
  };
853
- signalExit.exports.load = load;
853
+ signalExit$1.exports.load = load;
854
854
 
855
855
  var originalProcessReallyExit = process$1.reallyExit;
856
856
  var processReallyExit = function processReallyExit (code) {
@@ -886,7 +886,7 @@ if (!processOk(process$1)) {
886
886
  };
887
887
  }
888
888
 
889
- var onExit = signalExit.exports;
889
+ var signalExit = signalExit$1.exports;
890
890
 
891
891
  var getStream$2 = {exports: {}};
892
892
 
@@ -1107,4 +1107,4 @@ onetime$2.exports.callCount = function_ => {
1107
1107
 
1108
1108
  var onetime$1 = onetime$2.exports;
1109
1109
 
1110
- export { onetime$1 as a, getStream$2 as b, crossSpawn as c, crossSpawn$1 as d, onetime$2 as e, getStream$1 as g, mergeStream as m, onExit as o, pathKey$1 as p, signalExit as s };
1110
+ export { signalExit$1 as a, getStream$2 as b, crossSpawn as c, crossSpawn$1 as d, onetime$2 as e, getStream$1 as g, mergeStream as m, onetime$1 as o, pathKey$1 as p, signalExit as s };
package/dist/worker.js CHANGED
@@ -1,8 +1,8 @@
1
- import { w as resolve, g as getWorkerState } from './chunk-utils-global.46331799.js';
2
- import { c as createBirpc, M as ModuleCacheMap } from './chunk-vite-node-utils.3400d522.js';
3
- import { d as distDir } from './chunk-constants.a6ce1057.js';
4
- import { e as executeInViteNode } from './chunk-runtime-mocker.d325f149.js';
5
- import { r as rpc } from './chunk-runtime-rpc.9e81f15b.js';
1
+ import { w as resolve, g as getWorkerState } from './chunk-utils-global.a3293dce.js';
2
+ import { c as createBirpc, M as ModuleCacheMap } from './chunk-vite-node-utils.b4debb0b.js';
3
+ import { d as distDir } from './chunk-constants.c8f1d38c.js';
4
+ import { e as executeInViteNode } from './chunk-runtime-mocker.e802beae.js';
5
+ import { r as rpc } from './chunk-runtime-rpc.c47f2233.js';
6
6
  import 'path';
7
7
  import 'tty';
8
8
  import 'local-pkg';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vitest",
3
3
  "type": "module",
4
- "version": "0.9.3",
4
+ "version": "0.9.4",
5
5
  "description": "A blazing fast unit test framework powered by Vite",
6
6
  "keywords": [
7
7
  "vite",
@@ -75,27 +75,27 @@
75
75
  }
76
76
  },
77
77
  "dependencies": {
78
- "@types/chai": "^4.3.0",
78
+ "@types/chai": "^4.3.1",
79
79
  "@types/chai-subset": "^1.3.3",
80
80
  "chai": "^4.3.6",
81
81
  "local-pkg": "^0.4.1",
82
82
  "tinypool": "^0.1.2",
83
83
  "tinyspy": "^0.3.2",
84
- "vite": "^2.9.1"
84
+ "vite": "^2.9.5"
85
85
  },
86
86
  "devDependencies": {
87
87
  "@antfu/install-pkg": "^0.1.0",
88
- "@sinonjs/fake-timers": "^9.1.1",
88
+ "@sinonjs/fake-timers": "^9.1.2",
89
89
  "@types/diff": "^5.0.2",
90
90
  "@types/jsdom": "^16.2.14",
91
91
  "@types/micromatch": "^4.0.2",
92
92
  "@types/natural-compare": "^1.4.1",
93
- "@types/node": "^17.0.23",
93
+ "@types/node": "^17.0.25",
94
94
  "@types/prompts": "^2.4.0",
95
95
  "@types/sinonjs__fake-timers": "^8.1.2",
96
- "@vitest/ui": "0.9.3",
96
+ "@vitest/ui": "0.9.4",
97
97
  "birpc": "^0.2.2",
98
- "c8": "^7.11.0",
98
+ "c8": "^7.11.2",
99
99
  "cac": "^6.7.12",
100
100
  "chai-subset": "^1.6.0",
101
101
  "cli-truncate": "^3.1.0",
@@ -106,21 +106,21 @@
106
106
  "flatted": "^3.2.5",
107
107
  "happy-dom": "^2.55.0",
108
108
  "jsdom": "^19.0.0",
109
- "log-update": "^5.0.0",
109
+ "log-update": "^5.0.1",
110
110
  "magic-string": "^0.26.1",
111
111
  "micromatch": "^4.0.5",
112
- "mlly": "^0.5.1",
112
+ "mlly": "^0.5.2",
113
113
  "natural-compare": "^1.4.0",
114
114
  "pathe": "^0.2.0",
115
115
  "picocolors": "^1.0.0",
116
116
  "pkg-types": "^0.3.2",
117
117
  "pretty-format": "^27.5.1",
118
118
  "prompts": "^2.4.2",
119
- "rollup": "^2.70.1",
119
+ "rollup": "^2.70.2",
120
120
  "source-map-js": "^1.0.2",
121
121
  "strip-ansi": "^7.0.1",
122
122
  "typescript": "^4.6.3",
123
- "vite-node": "0.9.3",
123
+ "vite-node": "0.9.4",
124
124
  "ws": "^8.5.0"
125
125
  },
126
126
  "engines": {