test: add vitest-environment-nuxt
(#1186)
This commit is contained in:
parent
3513f09148
commit
bf25339bc9
15 changed files with 82 additions and 64 deletions
|
@ -289,7 +289,7 @@ interface UseUserLocalStorageCache {
|
|||
* Create reactive storage for the current user
|
||||
*/
|
||||
export function useUserLocalStorage<T extends object>(key: string, initial: () => T): Ref<T> {
|
||||
if (process.server)
|
||||
if (process.server || process.test)
|
||||
return shallowRef(initial())
|
||||
|
||||
// @ts-expect-error bind value to the function
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue