Skip to content

getAppConfig

Reads a vault config key, resolving the transport and vault from the current test context.

This is Obsidian’s own Vault.getConfig, so an absent key reads back as Obsidian’s default for it rather than as undefined — see this file’s header. Use setAppConfig’s AppConfigRestore.isPresent when the difference matters.

Import:

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

Signature:

function getAppConfig(params: GetAppConfigParams): Promise<unknown>

Parameters:

ParameterTypeDescription
paramsGetAppConfigParamsThe key to read, and transport / vault overrides.

Returns: Promise<unknown> — A Promise resolving to the key’s effective value.


Links to this page: