vitest 0.0.99 → 0.0.100
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/cli.js +2 -2
- package/dist/entry.js +2 -2
- package/dist/{global-0be1f687.js → global-b84f9970.js} +2 -2
- package/dist/{index-aa25bceb.js → index-0b2be7f7.js} +2 -4
- package/dist/{index-d5bb350e.js → index-113b8b23.js} +2 -0
- package/dist/{index-af51d171.js → index-d57cd3f0.js} +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -2
- package/dist/node.js +1 -1
- package/package.json +2 -3
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import require$$0 from 'readline';
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
3
|
import { e as ensurePackageInstalled } from './utils-b780070b.js';
|
|
4
|
-
import { c as createVitest } from './index-
|
|
4
|
+
import { c as createVitest } from './index-113b8b23.js';
|
|
5
5
|
import 'tty';
|
|
6
6
|
import 'local-pkg';
|
|
7
7
|
import 'path';
|
|
@@ -634,7 +634,7 @@ class CAC extends EventEmitter {
|
|
|
634
634
|
|
|
635
635
|
const cac = (name = "") => new CAC(name);
|
|
636
636
|
|
|
637
|
-
var version = "0.0.
|
|
637
|
+
var version = "0.0.100";
|
|
638
638
|
|
|
639
639
|
const cli = cac("vitest");
|
|
640
640
|
cli.version(version).option("-r, --root <path>", "root path").option("-c, --config <path>", "path to config file").option("-u, --update", "update snapshot").option("-w, --watch", "watch mode").option("-o, --open", "open Vitest UI").option("--api", "listen to port and serve API").option("--threads", "enabled threads", { default: true }).option("--silent", "silent").option("--run", "do not watch").option("--global", "inject apis globally").option("--dom", "mock browser api with happy-dom").option("--environment <env>", "runner environment", {
|
package/dist/entry.js
CHANGED
|
@@ -2,7 +2,7 @@ import fs, { promises } from 'fs';
|
|
|
2
2
|
import { Console } from 'console';
|
|
3
3
|
import { Writable } from 'stream';
|
|
4
4
|
import { importModule } from 'local-pkg';
|
|
5
|
-
import { e as expect, f as chai$1, u as util, h as setHooks, j as createSuiteHooks, k as clearContext, l as defaultSuite, m as context, n as getHooks, o as getFn } from './index-
|
|
5
|
+
import { e as expect, f as chai$1, u as util, h as setHooks, j as createSuiteHooks, k as clearContext, l as defaultSuite, m as context, n as getHooks, o as getFn } from './index-0b2be7f7.js';
|
|
6
6
|
import { a as commonjsRequire, c as commonjsGlobal } from './_commonjsHelpers-bdec4bbd.js';
|
|
7
7
|
import { l as index, g as getNames, c as c$1, t as toArray, b as basename, m as interpretOnlyMode, p as partitionSuiteChildren, o as hasTests, j as hasFailed } from './utils-b780070b.js';
|
|
8
8
|
import { r as rpc, s as send } from './rpc-7de86f29.js';
|
|
@@ -3886,7 +3886,7 @@ async function setupGlobalEnv(config) {
|
|
|
3886
3886
|
setupConsoleLogSpy();
|
|
3887
3887
|
await setupChai();
|
|
3888
3888
|
if (config.global)
|
|
3889
|
-
(await import('./global-
|
|
3889
|
+
(await import('./global-b84f9970.js')).registerApiGlobally();
|
|
3890
3890
|
}
|
|
3891
3891
|
function setupConsoleLogSpy() {
|
|
3892
3892
|
const stdout = new Writable({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { g as globalApis } from './constants-3cbd9066.js';
|
|
2
|
-
import { i as index } from './index-
|
|
2
|
+
import { i as index } from './index-d57cd3f0.js';
|
|
3
3
|
import 'url';
|
|
4
4
|
import './utils-b780070b.js';
|
|
5
5
|
import 'tty';
|
|
6
6
|
import 'local-pkg';
|
|
7
7
|
import 'path';
|
|
8
|
-
import './index-
|
|
8
|
+
import './index-0b2be7f7.js';
|
|
9
9
|
import './index-9e71c815.js';
|
|
10
10
|
import './_commonjsHelpers-bdec4bbd.js';
|
|
11
11
|
import 'tinyspy';
|
|
@@ -55,12 +55,10 @@ async function runWithSuite(suite, fn) {
|
|
|
55
55
|
context.currentSuite = prev;
|
|
56
56
|
}
|
|
57
57
|
function getDefaultTestTimeout() {
|
|
58
|
-
|
|
59
|
-
return ((_b = (_a = process.__vitest_worker__) == null ? void 0 : _a.config) == null ? void 0 : _b.testTimeout) ?? 5e3;
|
|
58
|
+
return process.__vitest_worker__.config.testTimeout;
|
|
60
59
|
}
|
|
61
60
|
function getDefaultHookTimeout() {
|
|
62
|
-
|
|
63
|
-
return ((_b = (_a = process.__vitest_worker__) == null ? void 0 : _a.config) == null ? void 0 : _b.hookTimeout) ?? 5e3;
|
|
61
|
+
return process.__vitest_worker__.config.hookTimeout;
|
|
64
62
|
}
|
|
65
63
|
function withTimeout(fn, _timeout) {
|
|
66
64
|
const timeout = _timeout ?? getDefaultTestTimeout();
|
|
@@ -7646,6 +7646,8 @@ function resolveConfig(options, viteConfig) {
|
|
|
7646
7646
|
resolved.interpretDefault = resolved.interpretDefault ?? true;
|
|
7647
7647
|
resolved.include = resolved.include ?? defaultInclude;
|
|
7648
7648
|
resolved.exclude = resolved.exclude ?? defaultExclude;
|
|
7649
|
+
resolved.testTimeout = resolved.testTimeout ?? 5e3;
|
|
7650
|
+
resolved.hookTimeout = resolved.hookTimeout ?? 1e4;
|
|
7649
7651
|
resolved.watchIgnore = resolved.watchIgnore ?? [/\/node_modules\//, /\/dist\//];
|
|
7650
7652
|
const CI = !!process.env.CI;
|
|
7651
7653
|
const UPDATE_SNAPSHOT = resolved.update || process.env.UPDATE_SNAPSHOT;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getCurrentSuite, w as withTimeout, a as getDefaultHookTimeout, u as util, s as suite, t as test, d as describe, i as it, b as assert, c as should, e as expect, f as chai } from './index-
|
|
1
|
+
import { g as getCurrentSuite, w as withTimeout, a as getDefaultHookTimeout, u as util, s as suite, t as test, d as describe, i as it, b as assert, c as should, e as expect, f as chai } from './index-0b2be7f7.js';
|
|
2
2
|
import * as tinyspy from 'tinyspy';
|
|
3
3
|
import { spies } from 'tinyspy';
|
|
4
4
|
|
package/dist/index.d.ts
CHANGED
|
@@ -570,12 +570,14 @@ declare class VitestUtils {
|
|
|
570
570
|
declare const vitest: VitestUtils;
|
|
571
571
|
declare const vi: VitestUtils;
|
|
572
572
|
|
|
573
|
+
declare type VitestInlineConfig = InlineConfig;
|
|
574
|
+
|
|
573
575
|
declare module 'vite' {
|
|
574
576
|
interface UserConfig {
|
|
575
577
|
/**
|
|
576
578
|
* Options for Vitest
|
|
577
579
|
*/
|
|
578
|
-
test?:
|
|
580
|
+
test?: VitestInlineConfig;
|
|
579
581
|
}
|
|
580
582
|
}
|
|
581
583
|
declare global {
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { b as assert, f as chai, d as describe, e as expect, i as it, c as should, s as suite, t as test } from './index-
|
|
2
|
-
export { a as afterAll, d as afterEach, b as beforeAll, c as beforeEach, f as fn, s as spyOn, e as vi, v as vitest } from './index-
|
|
1
|
+
export { b as assert, f as chai, d as describe, e as expect, i as it, c as should, s as suite, t as test } from './index-0b2be7f7.js';
|
|
2
|
+
export { a as afterAll, d as afterEach, b as beforeAll, c as beforeEach, f as fn, s as spyOn, e as vi, v as vitest } from './index-d57cd3f0.js';
|
|
3
3
|
import './index-9e71c815.js';
|
|
4
4
|
import './utils-b780070b.js';
|
|
5
5
|
import 'tty';
|
package/dist/node.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.100",
|
|
4
4
|
"description": "A blazing fast unit test framework powered by Vite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vite",
|
|
@@ -111,6 +111,5 @@
|
|
|
111
111
|
"build": "rimraf dist && rollup -c",
|
|
112
112
|
"dev": "rollup -c --watch src",
|
|
113
113
|
"typecheck": "tsc --noEmit"
|
|
114
|
-
}
|
|
115
|
-
"readme": "# vitest\n\n[](https://www.npmjs.com/package/vitest)\n\nA blazing fast unit test framework powered by Vite.\n\n> **This project is currently in closed beta exclusively for Sponsors.**<br>\n> Become a Sponsor of [@patak-dev](https://github.com/sponsors/patak-dev) or [@antfu](https://github.com/sponsors/antfu) to access the source code and issues tracker.\n> Learn more at [vitest.dev](https://vitest.dev)\n"
|
|
114
|
+
}
|
|
116
115
|
}
|