From: Eduardo San Martin Morote Date: Fri, 25 Jun 2021 10:28:45 +0000 (+0200) Subject: chore: remove unused code X-Git-Tag: v2.0.0-beta.5~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e20a1da6a6014ab528d0aa72e0f4bf1518ea68b3;p=thirdparty%2Fvuejs%2Fpinia.git chore: remove unused code --- diff --git a/src/index.ts b/src/index.ts index e9d31f23..09813b1b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -50,5 +50,5 @@ export type { _StoreObject, } from './mapHelpers' -export { createTestingPinia, getMockedStore } from './testing' +export { createTestingPinia } from './testing' export type { TestingOptions } from './testing' diff --git a/src/testing.ts b/src/testing.ts index 68867b5f..df7677d9 100644 --- a/src/testing.ts +++ b/src/testing.ts @@ -69,31 +69,3 @@ export function createTestingPinia({ return pinia } - -type StoreWithMockedActions = S extends Store< - string, - StateTree, - GettersTree, - infer A -> - ? { - [K in keyof A]: Spy - } - : {} - -/** - * Returns a type safe store that has mocks instead of actions. Requires a Mock type as a generic - * - * @example - * ```ts - * const pinia = createTestingPinia({ createSpy: jest.fn }) - * ``` - * - * @param store - store created with a testing pinia - * @returns a type safe store - */ -export function getMockedStore( - store: S -): S & StoreWithMockedActions { - return store as S & StoreWithMockedActions -}