MCPcopy Create free account
hub / github.com/dfinity/orbit / mockPinia

Function mockPinia

apps/wallet/src/test.utils.ts:24–32  ·  view source on GitHub ↗
(opts: { initialState?: StateTree; activate?: boolean })

Source from the content-addressed store, hash-verified

22});
23
24export const mockPinia = (opts: { initialState?: StateTree; activate?: boolean }): Pinia => {
25 const pinia = createTestingPinia({ initialState: opts.initialState });
26
27 if (opts.activate) {
28 setActivePinia(pinia);
29 }
30
31 return pinia;
32};
33
34export const mount = <T extends Component>(
35 component: T,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected