We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58a2302 commit 394f655Copy full SHA for 394f655
packages/testing/src/testing.ts
@@ -129,7 +129,14 @@ export function createTestingPinia({
129
/* istanbul ignore if */
130
if (!createSpy) {
131
throw new Error(
132
- '[@pinia/testing]: You must configure the `createSpy` option.'
+ '[@pinia/testing]: You must configure the `createSpy` option. See https://pinia.vuejs.org/cookbook/testing.html#Specifying-the-createSpy-function'
133
+ )
134
+ } else if (
135
+ typeof createSpy !== 'function' ||
136
+ 'mockReturnValue' in createSpy
137
+ ) {
138
+ throw new Error(
139
+ '[@pinia/testing]: Invalid `createSpy` option. See https://pinia.vuejs.org/cookbook/testing.html#Specifying-the-createSpy-function'
140
)
141
}
142
0 commit comments