@vitest/runner 0.33.0 → 0.34.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
@@ -1,7 +1,7 @@
1
1
  import { VitestRunner } from './types.js';
2
2
  export { CancelReason, VitestRunnerConfig, VitestRunnerConstructor, VitestRunnerImportSource } from './types.js';
3
- import { T as Task, F as File, d as SuiteAPI, e as TestAPI, f as SuiteCollector, g as SuiteHooks, O as OnTestFailedHandler, a as Test } from './tasks-f541c18c.js';
4
- export { D as DoneCallback, o as Fixtures, p as HookCleanupCallback, H as HookListener, R as RunMode, r as RuntimeContext, t as SequenceHooks, u as SequenceSetupFiles, S as Suite, q as SuiteFactory, i as TaskBase, b as TaskCustom, j as TaskMeta, k as TaskResult, l as TaskResultPack, h as TaskState, s as TestContext, m as TestFunction, n as TestOptions } from './tasks-f541c18c.js';
3
+ import { T as Task, F as File, d as SuiteAPI, e as TestAPI, f as SuiteCollector, g as SuiteHooks, O as OnTestFailedHandler, a as Test } from './tasks-abce80cc.js';
4
+ export { D as DoneCallback, o as Fixtures, p as HookCleanupCallback, H as HookListener, R as RunMode, r as RuntimeContext, t as SequenceHooks, u as SequenceSetupFiles, S as Suite, q as SuiteFactory, i as TaskBase, b as TaskCustom, j as TaskMeta, k as TaskResult, l as TaskResultPack, h as TaskState, s as TestContext, m as TestFunction, n as TestOptions } from './tasks-abce80cc.js';
5
5
  import { Awaitable } from '@vitest/utils';
6
6
 
7
7
  declare function updateTask(task: Task, runner: VitestRunner): void;
package/dist/index.js CHANGED
@@ -206,7 +206,7 @@ function createSuiteHooks() {
206
206
  };
207
207
  }
208
208
  function createSuiteCollector(name, factory = () => {
209
- }, mode, concurrent, shuffle, each, suiteOptions) {
209
+ }, mode, concurrent, sequential, shuffle, each, suiteOptions) {
210
210
  const tasks = [];
211
211
  const factoryQueue = [];
212
212
  let suite2;
@@ -229,7 +229,7 @@ function createSuiteCollector(name, factory = () => {
229
229
  repeats: options == null ? void 0 : options.repeats,
230
230
  meta: /* @__PURE__ */ Object.create(null)
231
231
  };
232
- if (this.concurrent || concurrent || runner.config.sequence.concurrent)
232
+ if (this.concurrent || !sequential && (concurrent || runner.config.sequence.concurrent))
233
233
  test3.concurrent = true;
234
234
  if (shuffle)
235
235
  test3.shuffle = true;
@@ -318,7 +318,7 @@ function createSuite() {
318
318
  options = { timeout: options };
319
319
  if (currentSuite == null ? void 0 : currentSuite.options)
320
320
  options = { ...currentSuite.options, ...options };
321
- return createSuiteCollector(formatName(name), factory, mode, this.concurrent, this.shuffle, this.each, options);
321
+ return createSuiteCollector(formatName(name), factory, mode, this.concurrent, this.sequence, this.shuffle, this.each, options);
322
322
  }
323
323
  suiteFn.each = function(cases, ...args) {
324
324
  const suite2 = this.withContext();
@@ -338,7 +338,7 @@ function createSuite() {
338
338
  suiteFn.skipIf = (condition) => condition ? suite.skip : suite;
339
339
  suiteFn.runIf = (condition) => condition ? suite : suite.skip;
340
340
  return createChainable(
341
- ["concurrent", "shuffle", "skip", "only", "todo"],
341
+ ["concurrent", "sequential", "shuffle", "skip", "only", "todo"],
342
342
  suiteFn
343
343
  );
344
344
  }
@@ -137,7 +137,7 @@ type Fixtures<T extends Record<string, any>, ExtraContext = {}> = {
137
137
  [P in keyof T | keyof ExtraContext as P extends K ? P extends keyof ExtraContext ? P : never : P]: K extends P ? K extends keyof ExtraContext ? ExtraContext[K] : never : P extends keyof T ? T[P] : never;
138
138
  } & TestContext, use: (fixture: T[K]) => Promise<void>) => Promise<void>);
139
139
  };
140
- type ChainableSuiteAPI<ExtraContext = {}> = ChainableFunction<'concurrent' | 'only' | 'skip' | 'todo' | 'shuffle', [
140
+ type ChainableSuiteAPI<ExtraContext = {}> = ChainableFunction<'concurrent' | 'sequential' | 'only' | 'skip' | 'todo' | 'shuffle', [
141
141
  name: string | Function,
142
142
  factory?: SuiteFactory<ExtraContext>,
143
143
  options?: number | TestOptions
package/dist/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { t as SequenceHooks, u as SequenceSetupFiles, F as File, a as Test, S as Suite, l as TaskResultPack, s as TestContext } from './tasks-f541c18c.js';
2
- export { D as DoneCallback, o as Fixtures, p as HookCleanupCallback, H as HookListener, O as OnTestFailedHandler, R as RunMode, r as RuntimeContext, d as SuiteAPI, f as SuiteCollector, q as SuiteFactory, g as SuiteHooks, T as Task, i as TaskBase, b as TaskCustom, j as TaskMeta, k as TaskResult, h as TaskState, e as TestAPI, m as TestFunction, n as TestOptions } from './tasks-f541c18c.js';
1
+ import { t as SequenceHooks, u as SequenceSetupFiles, F as File, a as Test, S as Suite, l as TaskResultPack, s as TestContext } from './tasks-abce80cc.js';
2
+ export { D as DoneCallback, o as Fixtures, p as HookCleanupCallback, H as HookListener, O as OnTestFailedHandler, R as RunMode, r as RuntimeContext, d as SuiteAPI, f as SuiteCollector, q as SuiteFactory, g as SuiteHooks, T as Task, i as TaskBase, b as TaskCustom, j as TaskMeta, k as TaskResult, h as TaskState, e as TestAPI, m as TestFunction, n as TestOptions } from './tasks-abce80cc.js';
3
3
  import '@vitest/utils';
4
4
 
5
5
  interface VitestRunnerConfig {
@@ -28,7 +28,7 @@ type VitestRunnerImportSource = 'collect' | 'setup';
28
28
  interface VitestRunnerConstructor {
29
29
  new (config: VitestRunnerConfig): VitestRunner;
30
30
  }
31
- type CancelReason = 'keyboard-input' | 'test-failure' | string & {};
31
+ type CancelReason = 'keyboard-input' | 'test-failure' | string & Record<string, never>;
32
32
  interface VitestRunner {
33
33
  /**
34
34
  * First thing that's getting called before actually collecting and running tests.
package/dist/utils.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { S as Suite, T as Task, a as Test, b as TaskCustom } from './tasks-f541c18c.js';
2
- export { C as ChainableFunction, c as createChainable } from './tasks-f541c18c.js';
1
+ import { S as Suite, T as Task, a as Test, b as TaskCustom } from './tasks-abce80cc.js';
2
+ export { C as ChainableFunction, c as createChainable } from './tasks-abce80cc.js';
3
3
  import { Arrayable } from '@vitest/utils';
4
4
 
5
5
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vitest/runner",
3
3
  "type": "module",
4
- "version": "0.33.0",
4
+ "version": "0.34.1",
5
5
  "description": "Vitest test runner",
6
6
  "license": "MIT",
7
7
  "funding": "https://opencollective.com/vitest",
@@ -40,7 +40,7 @@
40
40
  "dependencies": {
41
41
  "p-limit": "^4.0.0",
42
42
  "pathe": "^1.1.1",
43
- "@vitest/utils": "0.33.0"
43
+ "@vitest/utils": "0.34.1"
44
44
  },
45
45
  "scripts": {
46
46
  "build": "rimraf dist && rollup -c",