Skip to content

formatFailures

Builds the assertion message for a note’s failing buttons.

The captured output is included because a button’s failure is a runtime one — the stack CodeScript Toolkit prints under it is the only diagnosis there is.

Import:

import { formatFailures } from '@mnaoumov/obsidian-dev-toolkit/demo-vault-buttons';

Signature:

function formatFailures(noteName: string, failures: readonly DemoVaultButtonResult[]): string

Parameters:

Parameter Type Description
noteName string The note the buttons belong to.
failures readonly DemoVaultButtonResult[] The failing buttons.

Returns: string — The message.