index overview
Added in v1.0.0
Table of contents
exports
From “vitest”
Re-exports all named exports from the “vitest” module.
Signature
export * from "vitest"
Added in v1.0.0
utils
API (type alias)
Signature
export type API = V.TestAPI<{}>
Added in v1.0.0
Vitest (namespace)
Added in v1.0.0
Test (interface)
Signature
export interface Test<R> {
<A, E>(
name: string,
self: TestFunction<A, E, R, [V.TaskContext<V.Test<{}>> & V.TestContext]>,
timeout?: number | V.TestOptions
): void
}
Added in v1.0.0
TestFunction (interface)
Signature
export interface TestFunction<A, E, R, TestArgs extends Array<any>> {
(...args: TestArgs): Effect.Effect<A, E, R>
}
Added in v1.0.0
Tester (interface)
Signature
export interface Tester<R> extends Vitest.Test<R> {
skip: Vitest.Test<R>
skipIf: (condition: unknown) => Vitest.Test<R>
only: Vitest.Test<R>
each: <T>(
cases: ReadonlyArray<T>
) => <A, E>(name: string, self: TestFunction<A, E, R, Array<T>>, timeout?: number | V.TestOptions) => void
}
Added in v1.0.0
addEqualityTesters
Signature
export declare const addEqualityTesters: () => void
Added in v1.0.0
effect
Signature
export declare const effect: Vitest.Tester<TestServices.TestServices>
Added in v1.0.0
flakyTest
Signature
export declare const flakyTest: <A, E, R>(self: Effect.Effect<A, E, R>, timeout?: any) => Effect.Effect<A, never, R>
Added in v1.0.0
it
Signature
export declare const it: TestCollectorCallable<{}> & {
concurrent: b<
"concurrent" | "sequential" | "only" | "skip" | "todo" | "fails",
TestCollectorCallable<{}>,
{ each: TestEachFunction }
>
sequential: b<
"concurrent" | "sequential" | "only" | "skip" | "todo" | "fails",
TestCollectorCallable<{}>,
{ each: TestEachFunction }
>
only: b<
"concurrent" | "sequential" | "only" | "skip" | "todo" | "fails",
TestCollectorCallable<{}>,
{ each: TestEachFunction }
>
skip: b<
"concurrent" | "sequential" | "only" | "skip" | "todo" | "fails",
TestCollectorCallable<{}>,
{ each: TestEachFunction }
>
todo: b<
"concurrent" | "sequential" | "only" | "skip" | "todo" | "fails",
TestCollectorCallable<{}>,
{ each: TestEachFunction }
>
fails: b<
"concurrent" | "sequential" | "only" | "skip" | "todo" | "fails",
TestCollectorCallable<{}>,
{ each: TestEachFunction }
>
} & {
fn: (
this: Record<"concurrent" | "sequential" | "only" | "skip" | "todo" | "fails", any>,
name: string | Function,
options?: V.TestOptions | undefined,
fn?: V.TestFunction<{}> | undefined
) => void
} & { each: TestEachFunction } & ExtendedAPI<{}> & {
extend: <T>(
fixtures: u<T, {}>
) => V.TestAPI<{ [K in keyof T]: K extends keyof T ? T[K] : K extends never ? {}[K] : never }>
} & {
readonly effect: Vitest.Tester<TestServices.TestServices>
readonly live: Vitest.Tester<never>
readonly flakyTest: <A, E, R>(self: Effect.Effect<A, E, R>, timeout?: any) => Effect.Effect<A, never, R>
readonly scoped: Vitest.Tester<any>
readonly scopedLive: Vitest.Tester<Scope.Scope>
}
Added in v1.0.0
live
Signature
export declare const live: Vitest.Tester<never>
Added in v1.0.0
scoped
Signature
export declare const scoped: Vitest.Tester<any>
Added in v1.0.0
scopedLive
Signature
export declare const scopedLive: Vitest.Tester<Scope.Scope>
Added in v1.0.0