Skip to content

@pinia/root / @pinia/testing / TestingPinia

TestingPinia

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

Extends

Properties

app

ts
app: App<any>;

App used by Pinia


install()

ts
install: (app) => void;

Parameters

app: App<any>

Returns

void

Inherited from

Pinia.install


state

ts
state: Ref<Record<string, StateTree>, Record<string, StateTree>>;

root state

Inherited from

Pinia.state

Methods

use()

ts
use(plugin): Pinia

Adds a store plugin to extend every store

Parameters

plugin: PiniaPlugin

store plugin to add

Returns

Pinia

Inherited from

Pinia.use

Released under the MIT License.