Skip to content

selectUnexpectedFailures

Picks the buttons that failed and were not expected to.

Import:

import { selectUnexpectedFailures } from 'obsidian-dev-utils/script-utils/demo-vault-buttons';

Signature:

function selectUnexpectedFailures(noteName: string, results: readonly DemoVaultButtonResult[], expectedNonOkButtons: readonly ExpectedNonOkButton[]): DemoVaultButtonResult[]

Parameters:

Parameter Type Description
noteName string The note the results belong to, relative to the demo vault root.
results readonly DemoVaultButtonResult[] Every button’s result in that note.
expectedNonOkButtons readonly ExpectedNonOkButton[] The buttons allowed to end in a given non-ok status.

Returns: DemoVaultButtonResult[] — The results that are not ok and match no ExpectedNonOkButton.