Skip to content

throwOnWarning

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

Import:

import { throwOnWarning } from 'obsidian-dev-utils/script-utils/warnings-as-errors';

Signature:

function throwOnWarning(warning: Error): never

Parameters:

ParameterTypeDescription
warningErrorThe warning emitted by Node.

Returns: never