Skip to content

Commit 2e4f6ca

Browse files
committed
fix(testing): stub actions without app
1 parent 13d8f50 commit 2e4f6ca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/testing/src/testing.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ export function createTestingPinia({
120120
throw new Error('You must configure the `createSpy` option.')
121121
}
122122

123-
pinia.use(({ store, options }) => {
123+
// stub actions
124+
pinia._p.push(({ store, options }) => {
124125
Object.keys(options.actions).forEach((action) => {
125126
store[action] = stubActions ? createSpy() : createSpy(store[action])
126127
})

0 commit comments

Comments
 (0)