Skip to content

installWarningsAsErrors

Registers a process 'warning' listener that turns every Node warning into a test failure.

Idempotent: calling it more than once (e.g. from several setup files sharing one worker) registers the listener at most once, so it does not itself trigger a MaxListenersExceededWarning.

Import:

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

Signature:

function installWarningsAsErrors(): void

Returns: void