Skip to content

throwOnWarning

A process 'warning' listener that rethrows the warning as an error, failing the test run.

Import:

import { throwOnWarning } from '@mnaoumov/typescript-test-toolkit/warnings-as-errors';

Signature:

function throwOnWarning(warning: Error): never

Parameters:

Parameter Type Description
warning Error The warning emitted by Node.

Returns: never