From: zhao-li Date: Tue, 16 Aug 2022 06:52:46 +0000 (-1000) Subject: docs: import in testing (#1544) X-Git-Tag: @pinia/nuxt@0.4.1~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28358e15a22eda43db80761495273a30643b60bb;p=thirdparty%2Fvuejs%2Fpinia.git docs: import in testing (#1544) Co-authored-by: Eduardo San Martin Morote --- diff --git a/packages/docs/cookbook/testing.md b/packages/docs/cookbook/testing.md index 483d3bb2..4ff2cace 100644 --- a/packages/docs/cookbook/testing.md +++ b/packages/docs/cookbook/testing.md @@ -84,6 +84,8 @@ And make sure to create a testing pinia in your tests when mounting a component: ```js import { mount } from '@vue/test-utils' import { createTestingPinia } from '@pinia/testing' +// import any store you want to interact with in tests +import { useSomeStore } from '@/stores/myStore' const wrapper = mount(Counter, { global: {