On this page

    M

    afterEach

    History
    afterEach(fn): void
    Attributes
    The hook function. It receives an object with the benchmark's name, params, and signal.

    Registers a hook that runs once after each complete logical benchmark in the current suite. It does not run after every sample. Per-sample cleanup belongs in the benchmark function after context.end() or context.record().