Skip to content

How to test Store state in tests? #1539

Discussion options

You must be logged in to vote

hmmm...nevermind, I needed to import the store this way instead:

import { useGreetingStore } from '@/stores/greeting.js'

Though I am curious, what's the point of having this:

      global: {
        plugins: [
          createTestingPinia(),
        ],
      },

If I still have to import my actual store.

Sorry, I must be missing something super trivial...

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zhao-li
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant