Skip to main content

function after

#after(
fn?: HookFn,
options?: HookOptions,
): void

This function creates a hook that runs after executing a suite.

describe('tests', async () => {
  after(() => console.log('finished running tests'));
  it('is a subtest', () => {
    assert.ok('some relevant assertion here');
  });
});

Parameters #

#fn: HookFn
optional

The hook function. If the hook uses callbacks, the callback function is passed as the second argument.

#options: HookOptions
optional

Configuration options for the hook.

Return Type #

void

Did you find what you needed?

Privacy policy