vitest 0.0.112 → 0.0.113
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 +7 -5
- package/dist/{constants-2b0310b7.js → constants-900abe4a.js} +1 -1
- package/dist/{diff-66d6bb83.js → diff-9c43ab50.js} +3300 -3298
- package/dist/entry.js +74 -18
- package/dist/{global-201fd559.js → global-75208c77.js} +7 -6
- package/dist/{utils-cb6b1266.js → index-041e627e.js} +1 -185
- package/dist/{index-2bb9fd4d.js → index-09437c50.js} +1 -1
- package/dist/index-1488b423.js +186 -0
- package/dist/{index-8ab26d25.js → index-c3f2f9fe.js} +64 -1113
- package/dist/index.d.ts +16 -3
- package/dist/index.js +3 -4
- package/dist/magic-string.es-94000aea.js +1360 -0
- package/dist/{middleware-2028dfa0.js → middleware-0ebc5238.js} +2 -4
- package/dist/node.d.ts +1 -0
- package/dist/node.js +8 -6
- package/dist/utils.js +3 -2
- package/dist/{vi-cb9e4e4e.js → vi-51946984.js} +1 -1
- package/dist/worker.js +5 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { Formatter } from 'picocolors/types';
|
|
|
2
2
|
import { ViteDevServer } from 'vite';
|
|
3
3
|
import { OptionsReceived } from 'pretty-format';
|
|
4
4
|
import { MessagePort } from 'worker_threads';
|
|
5
|
+
import { RawSourceMap } from 'source-map-js';
|
|
5
6
|
export { Spy, SpyFn } from 'tinyspy';
|
|
6
7
|
export { assert, default as chai, should } from 'chai';
|
|
7
8
|
|
|
@@ -233,6 +234,7 @@ declare abstract class BaseReporter implements Reporter {
|
|
|
233
234
|
onUserConsoleLog(log: UserConsoleLog): void;
|
|
234
235
|
onServerRestart(): void;
|
|
235
236
|
reportSummary(files: File[]): Promise<void>;
|
|
237
|
+
private printTaskErrors;
|
|
236
238
|
}
|
|
237
239
|
|
|
238
240
|
interface ListRendererOptions {
|
|
@@ -298,6 +300,16 @@ interface UserConsoleLog {
|
|
|
298
300
|
type: 'stdout' | 'stderr';
|
|
299
301
|
taskId?: string;
|
|
300
302
|
}
|
|
303
|
+
interface Position {
|
|
304
|
+
line: number;
|
|
305
|
+
column: number;
|
|
306
|
+
}
|
|
307
|
+
interface ParsedStack {
|
|
308
|
+
method: string;
|
|
309
|
+
file: string;
|
|
310
|
+
line: number;
|
|
311
|
+
column: number;
|
|
312
|
+
}
|
|
301
313
|
|
|
302
314
|
declare type ChainableFunction<T extends string, Args extends any[], R = any> = {
|
|
303
315
|
(...args: Args): R;
|
|
@@ -608,6 +620,7 @@ interface WorkerContext {
|
|
|
608
620
|
}
|
|
609
621
|
interface RpcMap {
|
|
610
622
|
fetch: [[id: string], string | undefined];
|
|
623
|
+
getSourceMap: [[id: string, force?: boolean], RawSourceMap | undefined];
|
|
611
624
|
log: [[UserConsoleLog], void];
|
|
612
625
|
processExit: [[code?: number], void];
|
|
613
626
|
onCollected: [[files: File[]], void];
|
|
@@ -623,9 +636,9 @@ declare type RpcPayload<T extends keyof RpcMap = keyof RpcMap> = {
|
|
|
623
636
|
args: RpcMap[T][0];
|
|
624
637
|
};
|
|
625
638
|
|
|
626
|
-
declare const suite: ChainableFunction<"
|
|
639
|
+
declare const suite: ChainableFunction<"concurrent" | "skip" | "only" | "todo", [name: string, factory?: TestFactory | undefined], SuiteCollector>;
|
|
627
640
|
declare const test: TestCollector;
|
|
628
|
-
declare const describe: ChainableFunction<"
|
|
641
|
+
declare const describe: ChainableFunction<"concurrent" | "skip" | "only" | "todo", [name: string, factory?: TestFactory | undefined], SuiteCollector>;
|
|
629
642
|
declare const it: TestCollector;
|
|
630
643
|
|
|
631
644
|
declare const beforeAll: (fn: SuiteHooks['beforeAll'][0], timeout?: number | undefined) => void;
|
|
@@ -866,4 +879,4 @@ declare global {
|
|
|
866
879
|
}
|
|
867
880
|
}
|
|
868
881
|
|
|
869
|
-
export { ArgumentsOf, ArgumentsType, Arrayable, Awaitable, BuiltinEnvironment, ComputeMode, ConstructorArgumentsOf, DoneCallback, Environment, EnvironmentReturn, File, HookListener, InlineConfig, JestMockCompat, JestMockCompatContext, JestMockCompatFn, MaybeMocked, MaybeMockedConstructor, MaybeMockedDeep, MethodKeysOf, MockWithArgs, MockableFunction, MockedFunction, MockedFunctionDeep, MockedObject, MockedObjectDeep, ModuleCache, Nullable, PropertyKeysOf, Reporter, ResolvedConfig, RpcCall, RpcMap, RpcPayload, RpcSend, RunMode, RuntimeContext, SnapshotData, SnapshotMatchOptions, SnapshotResult, SnapshotStateOptions, SnapshotSummary, SnapshotUpdateState, Suite, SuiteCollector, SuiteHooks, Task, TaskBase, TaskResult, TaskResultPack, TaskState, Test, TestCollector, TestFactory, TestFunction, UncheckedSnapshot, UserConfig, UserConsoleLog, WorkerContext, afterAll, afterEach, beforeAll, beforeEach, describe, expect, fn, it, spies, spyOn, suite, test, vi, vitest };
|
|
882
|
+
export { ArgumentsOf, ArgumentsType, Arrayable, Awaitable, BuiltinEnvironment, ComputeMode, ConstructorArgumentsOf, DoneCallback, Environment, EnvironmentReturn, File, HookListener, InlineConfig, JestMockCompat, JestMockCompatContext, JestMockCompatFn, MaybeMocked, MaybeMockedConstructor, MaybeMockedDeep, MethodKeysOf, MockWithArgs, MockableFunction, MockedFunction, MockedFunctionDeep, MockedObject, MockedObjectDeep, ModuleCache, Nullable, ParsedStack, Position, PropertyKeysOf, Reporter, ResolvedConfig, RpcCall, RpcMap, RpcPayload, RpcSend, RunMode, RuntimeContext, SnapshotData, SnapshotMatchOptions, SnapshotResult, SnapshotStateOptions, SnapshotSummary, SnapshotUpdateState, Suite, SuiteCollector, SuiteHooks, Task, TaskBase, TaskResult, TaskResultPack, TaskState, Test, TestCollector, TestFactory, TestFunction, UncheckedSnapshot, UserConfig, UserConsoleLog, WorkerContext, afterAll, afterEach, beforeAll, beforeEach, describe, expect, fn, it, spies, spyOn, suite, test, vi, vitest };
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
export { d as describe, i as it, c as suite, t as test, e as vi, v as vitest } from './vi-
|
|
2
|
-
export { a as afterAll, d as afterEach, b as beforeAll, c as beforeEach, e as expect } from './index-
|
|
1
|
+
export { d as describe, i as it, c as suite, t as test, e as vi, v as vitest } from './vi-51946984.js';
|
|
2
|
+
export { a as afterAll, d as afterEach, b as beforeAll, c as beforeEach, e as expect } from './index-09437c50.js';
|
|
3
3
|
export { f as fn, s as spies, a as spyOn } from './jest-mock-a57b745c.js';
|
|
4
4
|
export { assert, default as chai, should } from 'chai';
|
|
5
|
-
import './
|
|
5
|
+
import './index-041e627e.js';
|
|
6
6
|
import 'tty';
|
|
7
7
|
import 'local-pkg';
|
|
8
|
-
import 'path';
|
|
9
8
|
import './_commonjsHelpers-c9e3b764.js';
|
|
10
9
|
import 'tinyspy';
|