From e20a1da6a6014ab528d0aa72e0f4bf1518ea68b3 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Fri, 25 Jun 2021 12:28:45 +0200 Subject: [PATCH] chore: remove unused code --- src/index.ts | 2 +- src/testing.ts | 28 ---------------------------- 2 files changed, 1 insertion(+), 29 deletions(-) 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 -} -- 2.47.2