API Documentation / @pinia/testing / TestingPinia

Interface: TestingPinia

@pinia/testing.TestingPinia

Pinia instance specifically designed for testing. Extends a regular Pinia instance with test specific properties.

Hierarchy

Properties

app

app: App<any>

App used by Pinia

Defined in

testing/src/testing.ts:60


state

state: Ref<Record<string, StateTree>>

root state

Inherited from

Pinia.state

Defined in

pinia/src/rootStore.ts:51

Methods

install

install(app): void

Parameters

NameType
appApp<any>

Returns

void

Inherited from

Pinia.install

Defined in

pinia/src/rootStore.ts:46


use

use(plugin): Pinia

Adds a store plugin to extend every store

Parameters

NameTypeDescription
pluginPiniaPluginstore plugin to add

Returns

Pinia

Inherited from

Pinia.use

Defined in

pinia/src/rootStore.ts:58