]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs: import in testing (#1544)
authorzhao-li <zhao.li@startingspark.com>
Tue, 16 Aug 2022 06:52:46 +0000 (20:52 -1000)
committerGitHub <noreply@github.com>
Tue, 16 Aug 2022 06:52:46 +0000 (08:52 +0200)
Co-authored-by: Eduardo San Martin Morote <posva@users.noreply.github.com>
packages/docs/cookbook/testing.md

index 483d3bb2f9912eb8008c8eca0e6738c780f74238..4ff2cace49b23b6b0814864edccf3137717436be 100644 (file)
@@ -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: {