Skip to main content Link Search Menu Expand Document (external link)

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 = TestAPI<{}>

Added in v1.0.0

addEqualityTesters

Signature

export declare const addEqualityTesters: () => void

Added in v1.0.0

effect

Signature

export declare const effect: (<E, A>(
  name: string,
  self: (ctx: V.TaskContext<V.Test<{}>> & V.TestContext) => Effect.Effect<A, E, TestServices.TestServices>,
  timeout?: number | V.TestOptions
) => void) & {
  skip: <E, A>(
    name: string,
    self: (ctx: V.TaskContext<V.Test<{}>> & V.TestContext) => Effect.Effect<A, E, TestServices.TestServices>,
    timeout?: number
  ) => void
  only: <E, A>(
    name: string,
    self: (ctx: V.TaskContext<V.Test<{}>> & V.TestContext) => Effect.Effect<A, E, TestServices.TestServices>,
    timeout?: number
  ) => void
}

Added in v1.0.0

flakyTest

Signature

export declare const flakyTest: <A, E, R>(self: Effect.Effect<A, E, R>, timeout?: Duration.Duration) => any

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, {}>
    ) => TestAPI<{ [K in keyof T]: K extends keyof T ? T[K] : K extends never ? {}[K] : never }>
  } & {
    readonly effect: (<E, A>(
      name: string,
      self: (ctx: V.TaskContext<V.Test<{}>> & V.TestContext) => Effect.Effect<A, E, TestServices.TestServices>,
      timeout?: number | V.TestOptions
    ) => void) & {
      skip: <E, A>(
        name: string,
        self: (ctx: V.TaskContext<V.Test<{}>> & V.TestContext) => Effect.Effect<A, E, TestServices.TestServices>,
        timeout?: number
      ) => void
      only: <E, A>(
        name: string,
        self: (ctx: V.TaskContext<V.Test<{}>> & V.TestContext) => Effect.Effect<A, E, TestServices.TestServices>,
        timeout?: number
      ) => void
    }
    readonly live: <E, A>(
      name: string,
      self: (ctx: V.TaskContext<V.Test<{}>> & V.TestContext) => Effect.Effect<A, E>,
      timeout?: number
    ) => void
    readonly flakyTest: <A, E, R>(self: Effect.Effect<A, E, R>, timeout?: Duration.Duration) => any
    readonly scoped: <E, A>(
      name: string,
      self: (ctx: V.TaskContext<V.Test<{}>> & V.TestContext) => Effect.Effect<A, E, any>,
      timeout?: number
    ) => void
    readonly scopedLive: <E, A>(
      name: string,
      self: (ctx: V.TaskContext<V.Test<{}>> & V.TestContext) => Effect.Effect<A, E, Scope.Scope>,
      timeout?: number
    ) => void
  }

Added in v1.0.0

live

Signature

export declare const live: <E, A>(
  name: string,
  self: (ctx: V.TaskContext<V.Test<{}>> & V.TestContext) => Effect.Effect<A, E>,
  timeout?: number
) => void

Added in v1.0.0

scoped

Signature

export declare const scoped: <E, A>(
  name: string,
  self: (ctx: V.TaskContext<V.Test<{}>> & V.TestContext) => Effect.Effect<A, E, any>,
  timeout?: number
) => void

Added in v1.0.0

scopedLive

Signature

export declare const scopedLive: <E, A>(
  name: string,
  self: (ctx: V.TaskContext<V.Test<{}>> & V.TestContext) => Effect.Effect<A, E, Scope.Scope>,
  timeout?: number
) => void

Added in v1.0.0