Skip to content

restoreAppConfig

Puts a key back exactly as setAppConfig found it — writing the captured value back, or deleting the key when the vault had never carried it.

The beforeAll / afterAll half of the seam. A test that scopes the change to one callback wants withAppConfig instead, which cannot forget the restore.

Import:

import { restoreAppConfig } from 'obsidian-integration-testing';

Signature:

function restoreAppConfig(restore: AppConfigRestore): Promise<void>

Parameters:

ParameterTypeDescription
restoreAppConfigRestoreThe token setAppConfig returned.

Returns: Promise<void> — A Promise that resolves once the key is back as it was.


Links to this page: