npm / @pinia/testing
@pinia/testing
What changed in @pinia/testing 3 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.
2 breaking1 new APIs and options1 behavior and defaults3 tooling10 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@pinia/testing 415 changes
Breaking changes 2
Pinia 4 is ESM only, which affects how projects can load the package.
The devtools API is upgraded to v8 and must be installed alongside pinia.
New APIs and options 1
piniaSymbol is now exported for use by developers.
Tooling 3
Errors and development warnings are refactored with Nostics to make detected problems easier to fix.
Settable getters (computed) are now editable in devtools.
Invalid properties passed to storeToRefs now produce a diagnostic.
Fixes and other changes 9
Shallow refs are now notified when applying the initial state in testing.
During hydration, reactive Set and Map state is replaced instead of unioned.
Types avoid treating a name ending in .vue as reserved.
The missing types exports field was re-added, restoring the package’s type exports.
Incorrect values in plugins now produce a diagnostic.
HMR now preserves runtime-added properties of setup store refs.
shouldHydrate now respects the skipHydrate marker on non-plain objects.
Nullish values are now skipped when using storeToRefs.
Subscribing the same callback twice no longer creates a duplicate watcher.
@pinia/testing 32 changes
Behavior and default changes 1
Pinia now detects global context on the server side and warns about it.
Fixes and other changes 1
Corrects incorrect supported values in package.json.