Skip to content

Upgrading ava 3 to 4

Breaking3.15.0 → 4.3.3Breaking36Platform3New18Changed20Fixed9Other8

BreakingUpgrade verdict

29 breaking changes and 3 platform requirement changes.

  • Snapshots saved by older versions of AVA will not match anymore. Regenerate them with the update command after you upgrade.
  • The option to give a snapshot a custom ID has been removed.
  • t.throws() and t.throwAsync() can no longer be called with null for the expectations argument.
  • Removes support for @ava/babel, which also removes enhanced assertions.
Top 5 of 32 that need code or config changes

Node.js requirement changed in 4.3.0: >=10.18.0 <11 || >=12.14.0 <12.17.0 || >=12.17.0 <13 || >=14.0.0 <15 || >=15 → >=12.22 <13 || >=14.17 <15 || >=16.4 <17 || >=18.

Adds cbor ^8.1.0.

Drops @concordance/react, cli-cursor, convert-source-map, equal-length, import-local, lodash, md5-hex, ora, read-pkg, source-map-support, trim-off-newlines, update-notifier.

Installs 164 packages in all (was 275).

Breaking29
Snapshots recorded with earlier AVA versions are no longer recognized; run npx ava -u to rebuild them after upgrading.
npx ava -u
t.snapshot() no longer accepts an options argument for customizing the snapshot ID.
t.snapshot()
t.throws() and t.throwAsync() can no longer be called with null for the expectations argument.
t.throws()t.throwAsync()
Removes support for @ava/babel, which also removes enhanced assertions.
@ava/babel
Enhanced assertions are no longer available as a consequence of removing @ava/babel support.
Removes support for the esm package.
esm
Snapshots no longer recognize React elements; this functionality is intended to move to a plugin interface.
t.snapshot() no longer works in hooks.
t.snapshot()
Implementation arguments now default to unknown in the TypeScript types.
Types are renamed: Meta replaces MetaInterface, and other Interface-suffixed types now use the Fn suffix.
MetaMetaInterface
The non-verbose reporter is removed because maintaining two subtly different reporter outputs proved too hard.
Globally installed AVA no longer uses any locally installed version; install locally and run with npx ava instead.
npx ava
Removes the --preserve-symlink option and npm link detection.
--preserve-symlink
t.snapshot() no longer works in hooks.
t.snapshot()
Removes support for the esm package.
esm
ava.config.js now follows the module type configured in package.json.
ava.config.jsava.config.mjspackage.json
Test files execute in worker threads rather than child processes by default.
t.teardown() now executes in last-in-first-out order.
t.teardown()
Globally installed AVA no longer uses a locally installed version, and test files from another project with its own AVA now fail to run.
npx ava
ava.config.* files may now be found outside your project directory.
ava.config.*
test() and t.try() no longer accept an array of test implementations.
test()t.try()
Removes test.cb() and t.end(); use async functions and util.promisify() instead.
test.cb()t.end()util.promisify()
The instanceOf expectation of t.throws() and t.throwsAsync() must now be an Error constructor.
t.throws()t.throwsAsync()instanceOf
Shared workers are available only in worker threads, not child processes.
A host of experimental features have become default and can no longer be opted into.
test.meta.file and test.meta.snapshotDirectory are now file URL strings.
test.meta.filetest.meta.snapshotDirectory
Whitespace in test titles is now normalized, which may make distinct tests share the same title.
Macros must now be declared using test.macro().
test.macro()
Test files from another project that also has AVA installed now fail to run because they use that other AVA version.
Platform3
AVA 4 requires at least Node.js 12.22, 14.17, 16.4 or 17, and Node.js 10 is no longer supported.
AVA 4 requires avajs/typescript@1.1 or newer.
avajs/typescript
Requires Node.js 12.20, 14.15 or 15; Node.js 10 is no longer supported.

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

  • added: export * from '../index'
  • added: export { default } from '../index'
  • added: export * from '../plugin'
  • removed: call AfterInterface(implementation: Implementation<Context>): void
  • removed: call AfterInterface(title: string, implementation: Implementation<Context>): void
  • removed: call AfterInterface<T extends any[]>(macros: OneOrMoreMacros<T, Context>, ...rest: T): void
  • removed: call AfterInterface<T extends any[]>(title: string, macros: OneOrMoreMacros<T, Context>, ...rest: T): void
  • removed: call AlwaysInterface(implementation: Implementation<Context>): void
  • removed: call AlwaysInterface(title: string, implementation: Implementation<Context>): void
  • removed: call AlwaysInterface<T extends any[]>(macros: OneOrMoreMacros<T, Context>, ...rest: T): void
  • removed: call AlwaysInterface<T extends any[]>(title: string, macros: OneOrMoreMacros<T, Context>, ...rest: T): void
  • removed: call AssertAssertion(actual: any, message?: string): void
  • removed: call BeforeInterface(implementation: Implementation<Context>): void
  • removed: call BeforeInterface(title: string, implementation: Implementation<Context>): void
  • removed: call BeforeInterface<T extends any[]>(macros: OneOrMoreMacros<T, Context>, ...rest: T): void
  • removed: call BeforeInterface<T extends any[]>(title: string, macros: OneOrMoreMacros<T, Context>, ...rest: T): void
  • removed: call CbFailingInterface(title: string, implementation: CbImplementation<Context>): void
  • removed: call CbFailingInterface<T extends any[]>(macros: OneOrMoreCbMacros<T, Context>, ...rest: T): void
  • removed: call CbFailingInterface<T extends any[]>(title: string, macros: OneOrMoreCbMacros<T, Context>, ...rest: T): void
  • removed: call CbInterface(title: string, implementation: CbImplementation<Context>): void
  • removed: call CbInterface<T extends any[]>(macros: OneOrMoreCbMacros<T, Context>, ...rest: T): void
  • removed: call CbInterface<T extends any[]>(title: string, macros: OneOrMoreCbMacros<T, Context>, ...rest: T): void
  • removed: call CbOnlyInterface(title: string, implementation: CbImplementation<Context>): void
  • removed: call CbOnlyInterface<T extends any[]>(macros: OneOrMoreCbMacros<T, Context>, ...rest: T): void
  • removed: call CbOnlyInterface<T extends any[]>(title: string, macros: OneOrMoreCbMacros<T, Context>, ...rest: T): void
  • removed: call CbSkipInterface(title: string, implementation: CbImplementation<Context>): void
  • removed: call CbSkipInterface<T extends any[]>(macros: OneOrMoreCbMacros<T, Context>, ...rest: T): void
  • removed: call CbSkipInterface<T extends any[]>(title: string, macros: OneOrMoreCbMacros<T, Context>, ...rest: T): void
  • removed: call DeepEqualAssertion<ValueType = any>(actual: ValueType, expected: ValueType, message?: string): void
  • removed: call FailAssertion(message?: string): void
  • removed: call FailingInterface(title: string, implementation: Implementation<Context>): void
  • removed: call FailingInterface<T extends any[]>(macros: OneOrMoreMacros<T, Context>, ...rest: T): void
  • removed: call FailingInterface<T extends any[]>(title: string, macros: OneOrMoreMacros<T, Context>, ...rest: T): void
  • removed: call FalseAssertion(actual: any, message?: string): void
  • removed: call FalsyAssertion(actual: any, message?: string): void
  • removed: call HookCbInterface(implementation: CbImplementation<Context>): void
  • removed: call HookCbInterface(title: string, implementation: CbImplementation<Context>): void
  • removed: call HookCbInterface<T extends any[]>(macros: OneOrMoreCbMacros<T, Context>, ...rest: T): void
  • removed: call HookCbInterface<T extends any[]>(title: string, macros: OneOrMoreCbMacros<T, Context>, ...rest: T): void
  • removed: call HookCbSkipInterface(implementation: CbImplementation<Context>): void
  • removed: call HookCbSkipInterface(title: string, implementation: CbImplementation<Context>): void
  • removed: call HookCbSkipInterface<T extends any[]>(macros: OneOrMoreCbMacros<T, Context>, ...rest: T): void
  • removed: call HookCbSkipInterface<T extends any[]>(title: string, macros: OneOrMoreCbMacros<T, Context>, ...rest: T): void
  • removed: call HookSkipInterface(implementation: Implementation<Context>): void
  • removed: call HookSkipInterface(title: string, implementation: Implementation<Context>): void
  • removed: call HookSkipInterface<T extends any[]>(macros: OneOrMoreMacros<T, Context>, ...rest: T): void
  • removed: call HookSkipInterface<T extends any[]>(title: string, macros: OneOrMoreMacros<T, Context>, ...rest: T): void
  • removed: call IsAssertion<ValueType = any>(actual: ValueType, expected: ValueType, message?: string): void
  • removed: call LikeAssertion(value: any, selector: Record<string, any>, message?: string): void
  • removed: call LogFn(...values: any[]): void
  • removed: call NotAssertion<ValueType = any>(actual: ValueType, expected: ValueType, message?: string): void
  • removed: call NotDeepEqualAssertion<ValueType = any>(actual: ValueType, expected: ValueType, message?: string): void
  • removed: call NotRegexAssertion(string: string, regex: RegExp, message?: string): void
  • removed: call NotThrowsAssertion(fn: () => any, message?: string): void
  • removed: call NotThrowsAsyncAssertion(fn: () => PromiseLike<any>, message?: string): Promise<void>
  • removed: call NotThrowsAsyncAssertion(promise: PromiseLike<any>, message?: string): Promise<void>
  • removed: call OnlyInterface(title: string, implementation: Implementation<Context>): void
  • removed: call OnlyInterface<T extends any[]>(macros: OneOrMoreMacros<T, Context>, ...rest: T): void
  • removed: call OnlyInterface<T extends any[]>(title: string, macros: OneOrMoreMacros<T, Context>, ...rest: T): void
  • removed: call PassAssertion(message?: string): void
  • removed: call PlanFn(count: number): void
  • removed: call RegexAssertion(string: string, regex: RegExp, message?: string): void
  • removed: call SerialInterface(title: string, implementation: Implementation<Context>): void
  • removed: call SerialInterface<T extends any[]>(macros: OneOrMoreMacros<T, Context>, ...rest: T): void
  • removed: call SerialInterface<T extends any[]>(title: string, macros: OneOrMoreMacros<T, Context>, ...rest: T): void
  • removed: call SkipInterface(title: string, implementation: Implementation<Context>): void
  • removed: call SkipInterface<T extends any[]>(macros: OneOrMoreMacros<T, Context>, ...rest: T): void
  • removed: call SkipInterface<T extends any[]>(title: string, macros: OneOrMoreMacros<T, Context>, ...rest: T): void
  • removed: call SnapshotAssertion(expected: any, message?: string): void
  • removed: call SnapshotAssertion(expected: any, options: SnapshotOptions, message?: string): void
  • removed: call TeardownFn(fn: () => void): void
  • removed: call TestInterface(title: string, implementation: Implementation<Context>): void
  • removed: call TestInterface<T extends any[]>(macros: OneOrMoreMacros<T, Context>, ...rest: T): void
  • removed: call TestInterface<T extends any[]>(title: string, macros: OneOrMoreMacros<T, Context>, ...rest: T): void
  • removed: call ThrowsAssertion<ThrownError extends Error>(fn: () => any, expectations?: ThrowsExpectation | null, message?: string): ThrownError
  • removed: call ThrowsAsyncAssertion<ThrownError extends Error>(fn: () => PromiseLike<any>, expectations: ThrowsExpectation, message?: string): Promise<ThrownError>
  • removed: call ThrowsAsyncAssertion<ThrownError extends Error>(fn: () => PromiseLike<any>, expectations?: null, message?: string): Promise<ThrownError>
  • removed: call ThrowsAsyncAssertion<ThrownError extends Error>(promise: PromiseLike<any>, expectations: ThrowsExpectation, message?: string): Promise<ThrownError>
  • removed: call ThrowsAsyncAssertion<ThrownError extends Error>(promise: PromiseLike<any>, expectations?: null, message?: string): Promise<ThrownError>
  • removed: call TimeoutFn(ms: number, message?: string): void
  • removed: call TodoDeclaration(title: string): void
  • removed: call TrueAssertion(actual: any, message?: string): void
  • removed: call TruthyAssertion(actual: any, message?: string): void
  • removed: call TryFn<Args extends any[]>(fn: EitherMacro<Args, Context>, ...args: Args): Promise<TryResult>
  • removed: call TryFn<Args extends any[]>(fn: [EitherMacro<Args, Context>, ...Array<EitherMacro<Args, Context>>], ...args: Args): Promise<TryResult[]>
  • removed: call TryFn<Args extends any[]>(title: string, fn: EitherMacro<Args, Context>, ...args: Args): Promise<TryResult>
  • removed: call TryFn<Args extends any[]>(title: string, fn: [EitherMacro<Args, Context>, ...Array<EitherMacro<Args, Context>>], ...args: Args): Promise<TryResult[]>
  • removed: const after: AfterInterface
  • removed: const afterEach: AfterInterface
  • removed: const before: BeforeInterface
  • removed: const beforeEach: BeforeInterface
  • removed: const cb: CbInterface
  • removed: const failing: FailingInterface
  • removed: const meta: MetaInterface
  • removed: const only: OnlyInterface
  • removed: const serial: SerialInterface
  • removed: const skip: SkipInterface
  • removed: const todo: TodoDeclaration
  • removed: interface AfterInterface<Context = unknown>
  • removed: interface AlwaysInterface<Context = unknown>
  • removed: interface AssertAssertion
  • removed: interface AssertionError extends Error
  • removed: interface Assertions
  • removed: interface BeforeInterface<Context = unknown>
  • removed: interface CbExecutionContext<Context = unknown> extends ExecutionContext<Context>
  • removed: interface CbFailingInterface<Context = unknown>
  • removed: interface CbInterface<Context = unknown>
  • removed: interface CbOnlyInterface<Context = unknown>
  • removed: interface CbSkipInterface<Context = unknown>
  • removed: interface DeepEqualAssertion
  • removed: interface ExecutionContext<Context = unknown> extends Assertions
  • removed: interface FailAssertion
  • removed: interface FailingInterface<Context = unknown>
  • removed: interface FalseAssertion
  • removed: interface FalsyAssertion
  • removed: interface HookCbInterface<Context = unknown>
  • removed: interface HookCbSkipInterface<Context = unknown>
  • removed: interface HookSkipInterface<Context = unknown>
  • removed: interface IsAssertion
  • removed: interface LikeAssertion
  • removed: interface LogFn
  • removed: interface MetaInterface
  • removed: interface NotAssertion
  • removed: interface NotDeepEqualAssertion
  • removed: interface NotRegexAssertion
  • removed: interface NotThrowsAssertion
  • removed: interface NotThrowsAsyncAssertion
  • removed: interface OnlyInterface<Context = unknown>
  • removed: interface PassAssertion
  • removed: interface PlanFn
  • removed: interface RegexAssertion
  • removed: interface SerialInterface<Context = unknown>
  • removed: interface SkipInterface<Context = unknown>
  • removed: interface SnapshotAssertion
  • removed: interface Subscribable
  • removed: interface TeardownFn
  • removed: interface TestInterface<Context = unknown>
  • removed: interface ThrowsAssertion
  • removed: interface ThrowsAsyncAssertion
  • removed: interface TimeoutFn
  • removed: interface TodoDeclaration
  • removed: interface TrueAssertion
  • removed: interface TruthyAssertion
  • removed: interface TryFn<Context = unknown>
  • removed: interface TryResult
  • removed: method AssertAssertion.skip(actual: any, message?: string): void
  • removed: method CbExecutionContext.end(error?: any): void
  • removed: method DeepEqualAssertion.skip(actual: any, expected: any, message?: string): void
  • removed: method FailAssertion.skip(message?: string): void
  • removed: method FalseAssertion.skip(actual: any, message?: string): void
  • removed: method FalsyAssertion.skip(actual: any, message?: string): void
  • removed: method IsAssertion.skip(actual: any, expected: any, message?: string): void
  • removed: method LikeAssertion.skip(value: any, selector: any, message?: string): void
  • removed: method LogFn.skip(...values: any[]): void
  • removed: method NotAssertion.skip(actual: any, expected: any, message?: string): void
  • removed: method NotDeepEqualAssertion.skip(actual: any, expected: any, message?: string): void
  • removed: method NotRegexAssertion.skip(string: string, regex: RegExp, message?: string): void
  • removed: method NotThrowsAssertion.skip(fn: () => any, message?: string): void
  • removed: method NotThrowsAsyncAssertion.skip(nonThrower: any, message?: string): void
  • removed: method PassAssertion.skip(message?: string): void
  • removed: method PlanFn.skip(count: number): void
  • removed: method RegexAssertion.skip(string: string, regex: RegExp, message?: string): void
  • removed: method SnapshotAssertion.skip(expected: any, message?: string): void
  • removed: method SnapshotAssertion.skip(expected: any, options: SnapshotOptions, message?: string): void
  • removed: method Subscribable.subscribe(observer: { error(err: any): void; complete(): void }): void
  • removed: method ThrowsAssertion.skip(fn: () => any, expectations?: any, message?: string): void
  • removed: method ThrowsAsyncAssertion.skip(thrower: any, expectations?: any, message?: string): void
  • removed: method TrueAssertion.skip(actual: any, message?: string): void
  • removed: method TruthyAssertion.skip(actual: any, message?: string): void
  • removed: method TryResult.commit(options?: CommitDiscardOptions): void
  • removed: method TryResult.discard(options?: CommitDiscardOptions): void
  • removed: property AfterInterface.always: AlwaysInterface<Context>
  • removed: property AfterInterface.cb: HookCbInterface<Context>
  • removed: property AfterInterface.skip: HookSkipInterface<Context>
  • removed: property AlwaysInterface.cb: HookCbInterface<Context>
  • removed: property AlwaysInterface.skip: HookSkipInterface<Context>
  • removed: property Assertions.assert: AssertAssertion
  • removed: property Assertions.deepEqual: DeepEqualAssertion
  • removed: property Assertions.fail: FailAssertion
  • removed: property Assertions.false: FalseAssertion
  • removed: property Assertions.falsy: FalsyAssertion
  • removed: property Assertions.is: IsAssertion
  • removed: property Assertions.like: LikeAssertion
  • removed: property Assertions.not: NotAssertion
  • removed: property Assertions.notDeepEqual: NotDeepEqualAssertion
  • removed: property Assertions.notRegex: NotRegexAssertion
  • removed: property Assertions.notThrows: NotThrowsAssertion
  • removed: property Assertions.notThrowsAsync: NotThrowsAsyncAssertion
  • removed: property Assertions.pass: PassAssertion
  • removed: property Assertions.regex: RegexAssertion
  • removed: property Assertions.snapshot: SnapshotAssertion
  • removed: property Assertions.throws: ThrowsAssertion
  • removed: property Assertions.throwsAsync: ThrowsAsyncAssertion
  • removed: property Assertions.true: TrueAssertion
  • removed: property Assertions.truthy: TruthyAssertion
  • removed: property BeforeInterface.cb: HookCbInterface<Context>
  • removed: property BeforeInterface.skip: HookSkipInterface<Context>
  • removed: property CbFailingInterface.only: CbOnlyInterface<Context>
  • removed: property CbFailingInterface.skip: CbSkipInterface<Context>
  • removed: property CbInterface.failing: CbFailingInterface<Context>
  • removed: property CbInterface.only: CbOnlyInterface<Context>
  • removed: property CbInterface.skip: CbSkipInterface<Context>
  • removed: property ExecutionContext.context: Context
  • removed: property ExecutionContext.log: LogFn
  • removed: property ExecutionContext.plan: PlanFn
  • removed: property ExecutionContext.teardown: TeardownFn
  • removed: property ExecutionContext.timeout: TimeoutFn
  • removed: property ExecutionContext.try: TryFn<Context>
  • removed: property FailingInterface.only: OnlyInterface<Context>
  • removed: property FailingInterface.skip: SkipInterface<Context>
  • removed: property HookCbInterface.skip: HookCbSkipInterface<Context>
  • removed: property MetaInterface.file: string
  • removed: property MetaInterface.snapshotDirectory: string
  • removed: property SerialInterface.after: AfterInterface<Context>
  • removed: property SerialInterface.afterEach: AfterInterface<Context>
  • removed: property SerialInterface.before: BeforeInterface<Context>
  • removed: property SerialInterface.beforeEach: BeforeInterface<Context>
  • removed: property SerialInterface.cb: CbInterface<Context>
  • removed: property SerialInterface.failing: FailingInterface<Context>
  • removed: property SerialInterface.only: OnlyInterface<Context>
  • removed: property SerialInterface.skip: SkipInterface<Context>
  • removed: property SerialInterface.todo: TodoDeclaration
  • removed: property TestInterface.after: AfterInterface<Context>
  • removed: property TestInterface.afterEach: AfterInterface<Context>
  • removed: property TestInterface.before: BeforeInterface<Context>
  • removed: property TestInterface.beforeEach: BeforeInterface<Context>
  • removed: property TestInterface.cb: CbInterface<Context>
  • removed: property TestInterface.failing: FailingInterface<Context>
  • removed: property TestInterface.meta: MetaInterface
  • removed: property TestInterface.only: OnlyInterface<Context>
  • removed: property TestInterface.serial: SerialInterface<Context>
  • removed: property TestInterface.skip: SkipInterface<Context>
  • removed: property TestInterface.todo: TodoDeclaration
  • removed: property TryResult.errors: AssertionError[]
  • removed: property TryResult.logs: string[]
  • removed: property TryResult.passed: boolean
  • removed: property TryResult.title: string
  • removed: readonly property ExecutionContext.passed: boolean
  • removed: readonly property ExecutionContext.title: string
  • removed: type CbImplementation<Context = unknown> = (t: CbExecutionContext<Context>) => ImplementationResult
  • removed: type CbMacro<Args extends any[], Context = unknown> = UntitledCbMacro<Args, Context> & { title?: (providedTitle: string | undefined, ...args: Args) => string }
  • removed: type CommitDiscardOptions = { retainLogs?: boolean }
  • removed: type Constructor = (new (...args: any[]) => any)
  • removed: type EitherCbMacro<Args extends any[], Context> = CbMacro<Args, Context> | UntitledCbMacro<Args, Context>
  • removed: type EitherMacro<Args extends any[], Context> = Macro<Args, Context> | UntitledMacro<Args, Context>
  • removed: type Implementation<Context = unknown> = (t: ExecutionContext<Context>) => ImplementationResult
  • removed: type ImplementationResult = PromiseLike<void> | Subscribable | void
  • removed: type Macro<Args extends any[], Context = unknown> = UntitledMacro<Args, Context> & { title?: (providedTitle: string | undefined, ...args: Args) => string }
  • removed: type OneOrMoreCbMacros<Args extends any[], Context> = EitherCbMacro<Args, Context> | [EitherCbMacro<Args, Context>, ...Array<EitherCbMacro<Args, Context>>]
  • removed: type OneOrMoreMacros<Args extends any[], Context> = EitherMacro<Args, Context> | [EitherMacro<Args, Context>, ...Array<EitherMacro<Args, Context>>]
  • removed: type SnapshotOptions = { id?: string }
  • removed: type ThrowsExpectation = { code?: string | number; instanceOf?: Constructor; is?: Error; message?: string | RegExp; name?: string }
  • removed: type UntitledCbMacro<Args extends any[], Context = unknown> = (t: CbExecutionContext<Context>, ...args: Args) => ImplementationResult
  • removed: type UntitledMacro<Args extends any[], Context = unknown> = (t: ExecutionContext<Context>, ...args: Args) => ImplementationResult
  • changed: const test: TestInterface → const test: TestFn
  • added: export * from './types/assertions'
  • added: export * from './types/subscribable'
  • added: export * from './types/test-fn'
  • added: export * from './types/try-fn'
  • removed: namespace SharedWorker.Experimental
  • removed: namespace SharedWorker.Plugin.Experimental
  • removed: type SharedWorker.Experimental.BroadcastMessage<Data = unknown> = { readonly id: string; replies: () => AsyncIterableIterator<ReceivedMessage<Data>> }
  • removed: type SharedWorker.Experimental.Protocol<Data = unknown> = { readonly initialData: Data; readonly protocol: 'experimental'; broadcast: (data: Data) => BroadcastMessage<Data>; ready: () => Protocol<Data>; subscribe: ()…
  • removed: type SharedWorker.Experimental.PublishedMessage<Data = unknown> = { readonly id: string; replies: () => AsyncIterableIterator<ReceivedMessage<Data>> }
  • removed: type SharedWorker.Experimental.ReceivedMessage<Data = unknown> = { readonly data: Data; readonly id: string; readonly testWorker: TestWorker; reply: (data: Data) => PublishedMessage<Data> }
  • removed: type SharedWorker.Experimental.TestWorker<Data = unknown> = { readonly id: string; readonly file: string; publish: (data: Data) => PublishedMessage<Data>; subscribe: () => AsyncIterableIterator<ReceivedMessage<Data>>; t…
  • removed: type SharedWorker.Plugin.Experimental.Protocol<Data = unknown> = { readonly available: Promise<void>; readonly currentlyAvailable: boolean; readonly protocol: 'experimental'; publish: (data: Data) => PublishedMessage<Data>;…
  • removed: type SharedWorker.Plugin.Experimental.PublishedMessage<Data = unknown> = { readonly id: string; replies: () => AsyncIterableIterator<ReceivedMessage<Data>> }
  • removed: type SharedWorker.Plugin.Experimental.ReceivedMessage<Data = unknown> = { readonly data: Data; readonly id: string; reply: (data: Data) => PublishedMessage<Data> }
  • changed: function registerSharedWorker<Data = unknown>(options: SharedWorker.Plugin.RegistrationOptions<'experimental', Data>): SharedWorker.Plugin.Experimental.Protocol<Data> → function registerSharedWorker<Data = unknown>(options: SharedWorker.Plugin.RegistrationOptions<'ava-4', Data>): SharedWorker.Plugin.Protocol<Data>
  • changed: type SharedWorker.FactoryOptions = { negotiateProtocol <Data = unknown>(supported: readonly ['experimental']): Experimental.Protocol<Data> } → type SharedWorker.FactoryOptions = { negotiateProtocol <Data = unknown>(supported: readonly ['ava-4']): Protocol<Data> }
  • changed: type SharedWorker.Plugin.RegistrationOptions<Identifier extends ProtocolIdentifier, Data = unknown> = { readonly filename: string; readonly initialData?: Data; readonly supportedProtocols: readonly Identifier[]; readonly teardown?: () => void } → type SharedWorker.Plugin.RegistrationOptions<Identifier extends ProtocolIdentifier, Data = unknown> = { readonly filename: string | URL; readonly initialData?: Data; readonly supportedProtocols: readonly Identifier[]; readonly teardown?: () => void }
  • changed: type SharedWorker.ProtocolIdentifier = 'experimental' → type SharedWorker.ProtocolIdentifier = 'ava-4'
  • added: type SharedWorker.BroadcastMessage<Data = unknown> = { readonly id: string; replies: () => AsyncIterableIterator<ReceivedMessage<Data>> }
  • added: type SharedWorker.Plugin.Protocol<Data = unknown> = { readonly available: Promise<void>; readonly currentlyAvailable: boolean; readonly protocol: 'ava-4'; publish: (data: Data) => PublishedMessage<Data>; subscri…
  • added: type SharedWorker.Plugin.PublishedMessage<Data = unknown> = { readonly id: string; replies: () => AsyncIterableIterator<ReceivedMessage<Data>> }
  • added: type SharedWorker.Plugin.ReceivedMessage<Data = unknown> = { readonly data: Data; readonly id: string; reply: (data: Data) => PublishedMessage<Data> }
  • added: type SharedWorker.Protocol<Data = unknown> = { readonly initialData: Data; readonly protocol: 'ava-4'; broadcast: (data: Data) => BroadcastMessage<Data>; ready: () => Protocol<Data>; subscribe: () => Asyn…
  • added: type SharedWorker.PublishedMessage<Data = unknown> = { readonly id: string; replies: () => AsyncIterableIterator<ReceivedMessage<Data>> }
  • added: type SharedWorker.ReceivedMessage<Data = unknown> = { readonly data: Data; readonly id: string; readonly testWorker: TestWorker; reply: (data: Data) => PublishedMessage<Data> }
  • added: type SharedWorker.TestWorker<Data = unknown> = { readonly id: string; readonly file: string; publish: (data: Data) => PublishedMessage<Data>; subscribe: () => AsyncIterableIterator<ReceivedMessage<Data>>; t…
  • added: call AssertAssertion(actual: any, message?: string): boolean
  • added: call DeepEqualAssertion<Actual extends Expected, Expected>(actual: Actual, expected: Expected, message?: string): expected is Actual
  • added: call DeepEqualAssertion<Actual, Expected extends Actual>(actual: Actual, expected: Expected, message?: string): actual is Expected
  • added: call DeepEqualAssertion<Actual, Expected>(actual: Actual, expected: Expected, message?: string): boolean
  • added: call FailAssertion(message?: string): boolean
  • added: call FalseAssertion(actual: any, message?: string): actual is false
  • added: call FalsyAssertion(actual: any, message?: string): boolean
  • added: call IsAssertion<Actual, Expected extends Actual>(actual: Actual, expected: Expected, message?: string): actual is Expected
  • added: call LikeAssertion<Expected extends Record<string, any>>(value: any, selector: Expected, message?: string): value is Expected
  • added: call NotAssertion<Actual, Expected>(actual: Actual, expected: Expected, message?: string): boolean
  • added: call NotDeepEqualAssertion<Actual, Expected>(actual: Actual, expected: Expected, message?: string): boolean
  • added: call NotRegexAssertion(string: string, regex: RegExp, message?: string): boolean
  • added: call NotThrowsAssertion(fn: () => any, message?: string): void
  • added: call NotThrowsAsyncAssertion(fn: () => PromiseLike<any>, message?: string): Promise<void>
  • added: call NotThrowsAsyncAssertion(promise: PromiseLike<any>, message?: string): Promise<void>
  • added: call PassAssertion(message?: string): boolean
  • added: call RegexAssertion(string: string, regex: RegExp, message?: string): boolean
  • added: call SnapshotAssertion(expected: any, message?: string): void
  • added: call ThrowsAssertion<ThrownError extends Error>(fn: () => any, expectations?: ThrowsExpectation, message?: string): ThrownError | undefined
  • added: call ThrowsAsyncAssertion<ThrownError extends Error>(fn: () => PromiseLike<any>, expectations?: ThrowsExpectation, message?: string): Promise<ThrownError | undefined>
  • added: call ThrowsAsyncAssertion<ThrownError extends Error>(promise: PromiseLike<any>, expectations?: ThrowsExpectation, message?: string): Promise<ThrownError | undefined>
  • added: call TrueAssertion(actual: any, message?: string): actual is true
  • added: call TruthyAssertion(actual: any, message?: string): boolean
  • added: interface AssertAssertion
  • added: interface Assertions
  • added: interface DeepEqualAssertion
  • added: interface FailAssertion
  • added: interface FalseAssertion
  • added: interface FalsyAssertion
  • added: interface IsAssertion
  • added: interface LikeAssertion
  • added: interface NotAssertion
  • added: interface NotDeepEqualAssertion
  • added: interface NotRegexAssertion
  • added: interface NotThrowsAssertion
  • added: interface NotThrowsAsyncAssertion
  • added: interface PassAssertion
  • added: interface RegexAssertion
  • added: interface SnapshotAssertion
  • added: interface ThrowsAssertion
  • added: interface ThrowsAsyncAssertion
  • added: interface TrueAssertion
  • added: interface TruthyAssertion
  • added: method AssertAssertion.skip(actual: any, message?: string): void
  • added: method DeepEqualAssertion.skip(actual: any, expected: any, message?: string): void
  • added: method FailAssertion.skip(message?: string): void
  • added: method FalseAssertion.skip(actual: any, message?: string): void
  • added: method FalsyAssertion.skip(actual: any, message?: string): void
  • added: method IsAssertion.skip(actual: any, expected: any, message?: string): void
  • added: method LikeAssertion.skip(value: any, selector: any, message?: string): void
  • added: method NotAssertion.skip(actual: any, expected: any, message?: string): void
  • added: method NotDeepEqualAssertion.skip(actual: any, expected: any, message?: string): void
  • added: method NotRegexAssertion.skip(string: string, regex: RegExp, message?: string): void
  • added: method NotThrowsAssertion.skip(fn: () => any, message?: string): void
  • added: method NotThrowsAsyncAssertion.skip(nonThrower: any, message?: string): void
  • added: method PassAssertion.skip(message?: string): void
  • added: method RegexAssertion.skip(string: string, regex: RegExp, message?: string): void
  • added: method SnapshotAssertion.skip(expected: any, message?: string): void
  • added: method ThrowsAssertion.skip(fn: () => any, expectations?: any, message?: string): void
  • added: method ThrowsAsyncAssertion.skip(thrower: any, expectations?: any, message?: string): void
  • added: method TrueAssertion.skip(actual: any, message?: string): void
  • added: method TruthyAssertion.skip(actual: any, message?: string): void
  • added: property Assertions.assert: AssertAssertion
  • added: property Assertions.deepEqual: DeepEqualAssertion
  • added: property Assertions.fail: FailAssertion
  • added: property Assertions.false: FalseAssertion
  • added: property Assertions.falsy: FalsyAssertion
  • added: property Assertions.is: IsAssertion
  • added: property Assertions.like: LikeAssertion
  • added: property Assertions.not: NotAssertion
  • added: property Assertions.notDeepEqual: NotDeepEqualAssertion
  • added: property Assertions.notRegex: NotRegexAssertion
  • added: property Assertions.notThrows: NotThrowsAssertion
  • added: property Assertions.notThrowsAsync: NotThrowsAsyncAssertion
  • added: property Assertions.pass: PassAssertion
  • added: property Assertions.regex: RegexAssertion
  • added: property Assertions.snapshot: SnapshotAssertion
  • added: property Assertions.throws: ThrowsAssertion
  • added: property Assertions.throwsAsync: ThrowsAsyncAssertion
  • added: property Assertions.true: TrueAssertion
  • added: property Assertions.truthy: TruthyAssertion
  • added: type ErrorConstructor = new (...args: any[]) => Error
  • added: type ThrowsExpectation = { code?: string | number; instanceOf?: ErrorConstructor; is?: Error; message?: string | RegExp | ((message: string) => boolean); name?: string }
  • added: interface Subscribable
  • added: method Subscribable.subscribe(observer: { error(error: any): void; complete(): void }): void
  • added: call AfterFn<Args extends unknown[]>(implementation: Implementation<Args, Context>, ...args: Args): void
  • added: call AfterFn<Args extends unknown[]>(title: string, implementation: Implementation<Args, Context>, ...args: Args): void
  • added: call AlwaysInterface<Args extends unknown[]>(implementation: Implementation<Args, Context>, ...args: Args): void
  • added: call AlwaysInterface<Args extends unknown[]>(title: string, implementation: Implementation<Args, Context>, ...args: Args): void
  • added: call BeforeFn<Args extends unknown[]>(implementation: Implementation<Args, Context>, ...args: Args): void
  • added: call BeforeFn<Args extends unknown[]>(title: string, implementation: Implementation<Args, Context>, ...args: Args): void
  • added: call FailingFn<Args extends unknown[]>(macro: Macro<Args, Context>, ...args: Args): void
  • added: call FailingFn<Args extends unknown[]>(title: string, implementation: Implementation<Args, Context>, ...args: Args): void
  • added: call HookSkipFn<Args extends unknown[]>(implementation: Implementation<Args, Context>, ...args: Args): void
  • added: call HookSkipFn<Args extends unknown[]>(title: string, implementation: Implementation<Args, Context>, ...args: Args): void
  • added: call LogFn(...values: any[]): void
  • added: call MacroFn<Args extends unknown[]>(declaration: MacroDeclarationOptions<Args, Context>): Macro<Args, Context>
  • added: call MacroFn<Args extends unknown[]>(exec: ImplementationFn<Args, Context>): Macro<Args, Context>
  • added: call OnlyFn<Args extends unknown[]>(macro: Macro<Args, Context>, ...args: Args): void
  • added: call OnlyFn<Args extends unknown[]>(title: string, implementation: Implementation<Args, Context>, ...args: Args): void
  • added: call PlanFn(count: number): void
  • added: call SerialFn<Args extends unknown[]>(macro: Macro<Args, Context>, ...args: Args): void
  • added: call SerialFn<Args extends unknown[]>(title: string, implementation: Implementation<Args, Context>, ...args: Args): void
  • added: call SkipFn<Args extends unknown[]>(macro: Macro<Args, Context>, ...args: Args): void
  • added: call SkipFn<Args extends unknown[]>(title: string, implementation: Implementation<Args, Context>, ...args: Args): void
  • added: call TestFn<Args extends unknown[]>(macro: Macro<Args, Context>, ...args: Args): void
  • added: call TestFn<Args extends unknown[]>(title: string, implementation: Implementation<Args, Context>, ...args: Args): void
  • added: interface AfterFn<Context = unknown>
  • added: interface AlwaysInterface<Context = unknown>
  • added: interface BeforeFn<Context = unknown>
  • added: interface ExecutionContext<Context = unknown> extends Assertions
  • added: interface FailingFn<Context = unknown>
  • added: interface HookSkipFn<Context = unknown>
  • added: interface LogFn
  • added: interface MacroFn<Context = unknown>
  • added: interface Meta
  • added: interface OnlyFn<Context = unknown>
  • added: interface PlanFn
  • added: interface SerialFn<Context = unknown>
  • added: interface SkipFn<Context = unknown>
  • added: interface TestFn<Context = unknown>
  • added: method LogFn.skip(...values: any[]): void
  • added: method PlanFn.skip(count: number): void
  • added: property AfterFn.always: AlwaysInterface<Context>
  • added: property AfterFn.skip: HookSkipFn<Context>
  • added: property AlwaysInterface.skip: HookSkipFn<Context>
  • added: property BeforeFn.skip: HookSkipFn<Context>
  • added: property ExecutionContext.context: Context
  • added: property FailingFn.only: OnlyFn<Context>
  • added: property FailingFn.skip: SkipFn<Context>
  • added: property Meta.file: string
  • added: property Meta.snapshotDirectory: string
  • added: property SerialFn.after: AfterFn<Context>
  • added: property SerialFn.afterEach: AfterFn<Context>
  • added: property SerialFn.before: BeforeFn<Context>
  • added: property SerialFn.beforeEach: BeforeFn<Context>
  • added: property SerialFn.failing: FailingFn<Context>
  • added: property SerialFn.only: OnlyFn<Context>
  • added: property SerialFn.skip: SkipFn<Context>
  • added: property SerialFn.todo: TodoFn
  • added: property TestFn.after: AfterFn<Context>
  • added: property TestFn.afterEach: AfterFn<Context>
  • added: property TestFn.before: BeforeFn<Context>
  • added: property TestFn.beforeEach: BeforeFn<Context>
  • added: property TestFn.failing: FailingFn<Context>
  • added: property TestFn.macro: MacroFn<Context>
  • added: property TestFn.meta: Meta
  • added: property TestFn.only: OnlyFn<Context>
  • added: property TestFn.serial: SerialFn<Context>
  • added: property TestFn.skip: SkipFn<Context>
  • added: property TestFn.todo: TodoFn
  • added: readonly property ExecutionContext.log: LogFn
  • added: readonly property ExecutionContext.passed: boolean
  • added: readonly property ExecutionContext.plan: PlanFn
  • added: readonly property ExecutionContext.teardown: TeardownFn
  • added: readonly property ExecutionContext.timeout: TimeoutFn
  • added: readonly property ExecutionContext.title: string
  • added: readonly property ExecutionContext.try: TryFn<Context>
  • added: type Implementation<Args extends unknown[], Context = unknown> = ImplementationFn<Args, Context> | Macro<Args, Context>
  • added: type ImplementationFn<Args extends unknown[], Context = unknown> = ((t: ExecutionContext<Context>, ...args: Args) => PromiseLike<void>) | ((t: ExecutionContext<Context>, ...args: Args) => Subscribable) | ((t: ExecutionContext<…
  • added: type Macro<Args extends unknown[], Context = unknown> = { readonly exec: ImplementationFn<Args, Context>; readonly title?: TitleFn<Args> }
  • added: type MacroDeclarationOptions<Args extends unknown[], Context = unknown> = { exec: ImplementationFn<Args, Context>; title: TitleFn<Args> }
  • added: type TeardownFn = (fn: (() => Promise<void>) | (() => void)) => void
  • added: type TimeoutFn = (ms: number, message?: string) => void
  • added: type TitleFn<Args extends unknown[]> = (providedTitle: string | undefined, ...args: Args) => string
  • added: type TodoFn = (title: string) => void
  • added: call TryFn<Args extends unknown[]>(fn: Implementation<Args, Context>, ...args: Args): Promise<TryResult>
  • added: call TryFn<Args extends unknown[]>(title: string, fn: Implementation<Args, Context>, ...args: Args): Promise<TryResult>
  • added: interface AssertionError extends Error
  • added: interface TryFn<Context = unknown>
  • added: interface TryResult
  • added: method TryResult.commit(options?: CommitDiscardOptions): void
  • added: method TryResult.discard(options?: CommitDiscardOptions): void
  • added: property TryResult.errors: AssertionError[]
  • added: property TryResult.logs: string[]
  • added: property TryResult.passed: boolean
  • added: property TryResult.title: string
  • added: type CommitDiscardOptions = { retainLogs?: boolean }