Skip to content

Upgrading vitest 0.9 to 0.10

Safe0.9.4 → 0.10.5New4Fixed13Other2

SafeUpgrade verdict

Only new features and fixes in this range.

  • Nothing in this range needs changes to your code. It adds features and fixes.
Nothing to change

No breaking, platform, security or deprecated items in this range.

Nothing in this upgrade needs a code or configuration change.

Generated by DepDelta from published .d.ts files. Not mixed with prose notes.

  • changed: const describe: SuiteAPI → const describe: SuiteAPI<{}>
  • changed: const it: TestAPI → const it: TestAPI<{}>
  • changed: const suite: SuiteAPI → const suite: SuiteAPI<{}>
  • changed: const test: TestAPI → const test: TestAPI<{}>
  • changed: interface SuiteCollector → interface SuiteCollector<ExtraContext = {}>
  • changed: interface Test extends TaskBase → interface Test<ExtraContext = {}> extends TaskBase
  • changed: method Vitest.printError(err: unknown): Promise<void> → method Vitest.printError(err: unknown, fullStack?: boolean, type?: string): Promise<void>
  • changed: property InlineConfig.reporters?: Arrayable<BuiltinReporters | Reporter> → property InlineConfig.reporters?: Arrayable<BuiltinReporters | Reporter | Omit<string, BuiltinReporters>>
  • changed: property Reporter.onFinished?: (files?: File[]) => Awaitable<void> → property Reporter.onFinished?: (files?: File[], errors?: unknown[]) => Awaitable<void>
  • changed: property SuiteCollector.tasks: (Suite | Test | SuiteCollector)[] → property SuiteCollector.tasks: (Suite | Test | SuiteCollector<ExtraContext>)[]
  • changed: property SuiteCollector.test: TestAPI → property SuiteCollector.test: TestAPI<ExtraContext>
  • changed: property SuiteHooks.afterEach: HookListener<[Test, Suite]>[] → property SuiteHooks.afterEach: HookListener<[TestContext, Suite]>[]
  • changed: property SuiteHooks.beforeAll: HookListener<[Suite]>[] → property SuiteHooks.beforeAll: HookListener<[Suite], () => Awaitable<void>>[]
  • changed: property SuiteHooks.beforeEach: HookListener<[Test, Suite]>[] → property SuiteHooks.beforeEach: HookListener<[TestContext, Suite], () => Awaitable<void>>[]
  • changed: property WorkerRPC.onFinished: (files: File[]) => void → property WorkerRPC.onFinished: (files: File[], errors?: unknown[]) => void
  • changed: type HookListener<T extends any[]> = (...args: T) => Awaitable<void> → type HookListener<T extends any[], Return = void> = (...args: T) => Awaitable<Return | void>
  • changed: type SuiteAPI = ChainableFunction<'concurrent' | 'only' | 'skip' | 'todo', [name: string, factory?: SuiteFactory], SuiteCollector> & { each: EachFunction } → type SuiteAPI<ExtraContext = {}> = ChainableFunction<'concurrent' | 'only' | 'skip' | 'todo', [name: string, factory?: SuiteFactory], SuiteCollector<ExtraContext>> & { each: EachFunction; skipIf…
  • changed: type TestAPI = ChainableFunction<'concurrent' | 'only' | 'skip' | 'todo' | 'fails', [name: string, fn?: TestFunction, timeout?: number], void> & { each: EachFunction } → type TestAPI<ExtraContext = {}> = ChainableFunction<'concurrent' | 'only' | 'skip' | 'todo' | 'fails', [name: string, fn?: TestFunction<ExtraContext>, timeout?: number], void> & { each: EachFun…
  • changed: type TestFunction = (done: DoneCallback) => Awaitable<void> → type TestFunction<ExtraContext = {}> = (context: TestContext & ExtraContext) => Awaitable<void>
  • added: call TestContext(error?: any): void
  • added: function createExpect(test?: Test): Vi.ExpectStatic
  • added: function withCallback(fn: (done: DoneCallback) => void): Promise<void>
  • added: interface TestContext
  • added: property ErrorWithDiff.type?: string
  • added: property InlineConfig.logHeapUsage?: boolean
  • added: property TaskResult.heap?: number
  • added: property Test.context: TestContext & ExtraContext
  • added: property TestContext.expect: Vi.ExpectStatic
  • added: property TestContext.meta: Readonly<Test>
  • added: property Vitest.runner: ViteNodeRunner
  • added: property WorkerRPC.onUnhandledRejection: (err: unknown) => void
  • added: type HookCleanupCallback = (() => Awaitable<void>) | void
  • changed: method Vitest.printError(err: unknown): Promise<void> → method Vitest.printError(err: unknown, fullStack?: boolean, type?: string): Promise<void>
  • added: property Vitest.runner: ViteNodeRunner