interface HooksObject

Lifecycle hooks available inside a module() callback.

Type Parameters

A = unknown

Methods

before(fn: HookFn<A>): void

Runs once before the first test in the module.

beforeEach(fn: HookFn<A>): void

Runs before each test in the module.

afterEach(fn: HookFn<A>): void

Runs after each test in the module.

after(fn: HookFn<A>): void

Runs once after the last test in the module.

Usage

import { type HooksObject } from ".";