describe('Root State', () => {
mockWarn()
- const useA = defineStore({
- id: 'a',
+ const useA = defineStore('a', {
state: () => ({ a: 'a' }),
})
- const useB = defineStore({
- id: 'b',
+ const useB = defineStore('b', {
state: () => ({ b: 'b' }),
})
--- /dev/null
+import { beforeEach } from 'vitest'
+import { setActivePinia } from '../src'
+
+beforeEach(() => {
+ setActivePinia(undefined)
+})
],
},
test: {
+ isolate: false,
+ // threads: false,
coverage: {
reporter: ['html', 'lcov', 'text'],
include: ['packages/pinia/src/**/*.ts', 'packages/testing/src/**/*.ts'],
'**/src/vue2-plugin.ts',
],
},
+ setupFiles: ['packages/pinia/__tests__/vitest-setup.ts'],
environment: 'happy-dom',
globals: true, // Specifically to make createTestingPinia happy
},