expect(store.$state.nested.foo).toBe('bar')
})
- it('supports being called between piniauests', () => {
+ it('supports being called between two applications', () => {
const pinia1 = createPinia()
const pinia2 = createPinia()
setActivePinia(pinia1)
const aStore = useA()
- // simulate a different piniauest
+ // simulate a different application
setActivePinia(pinia2)
const bStore = useB()
bStore.$state.b = 'c'
expect(store.upperCaseName).toBe('ED')
})
- it('supports changing between piniauests', () => {
+ it('supports changing between applications', () => {
const pinia1 = createPinia()
const pinia2 = createPinia()
setActivePinia(pinia1)
const aStore = useA()
- // simulate a different piniauest
+ // simulate a different applications
setActivePinia(pinia2)
const bStore = useB()
bStore.b = 'c'
})
})
- it('does not mix up different piniauests', () => {
+ it('does not mix up different applications', () => {
const pinia1 = createPinia()
const pinia2 = createPinia()
useA(pinia1)
/**
* The api needs more work we must be able to use the store easily in any
* function by calling `useStore` to get the store Instance and we also need to
- * be able to reset the store instance between piniauests on the server
+ * be able to reset the store instance between applications on the server
*/
export const storesMap = new WeakMap<
/**
* Gets the root state of all active stores. This is useful when reporting an application crash by
* retrieving the problematic state and send it to your error tracking service.
- * @param pinia - piniauest key
+ * @param pinia - application's pinia
*/
export function getRootState(pinia: Pinia): Record<string, StateTree> {
return pinia.state.value