"lint": "prettier -c --parser typescript \"packages/*/{src,__tests__,e2e}/**/*.[jt]s?(x)\" \"packages/docs/**/*.[jt]s\"",
"lint:fix": "pnpm run lint --write",
"test": "pnpm run -r dev:prepare && pnpm run test:types && pnpm run test:vitest && pnpm run -r test && pnpm run build && pnpm run build:dts && pnpm test:dts",
- "test:vitest": "vitest run --coverage",
+ "test:vitest": "vitest --coverage",
"test:types": "tsc --build ./tsconfig.json",
"test:dts": "pnpm run -r test:dts",
"docs:api": "pnpm run --filter ./packages/docs -r docs:api"
})
it('warns if creating a store without a pinia', () => {
- expect(() => useA()).toThrowError(/with no active Pinia/)
+ expect(() => useA()).toThrowError(/there was no active Pinia/)
})
it('works with no stores', () => {
if (__DEV__ && !activePinia) {
throw new Error(
- `[🍍]: getActivePinia was called with no active Pinia. Did you forget to install pinia?\n` +
+ `[🍍]: "getActivePinia()" was called but there was no active Pinia. Did you forget to install pinia?\n` +
`\tconst pinia = createPinia()\n` +
`\tapp.use(pinia)\n` +
`This will fail in production.`