Enhance Vitest configuration and improve Vue integration

- Added Vue plugin to vitest.config.ts for better component testing.
- Introduced vitest.setup.ts to expose Vue reactivity and lifecycle methods globally, ensuring compatibility with .vue components.
- Updated mock implementations in nuxt-imports.ts to include readonly for improved reactivity handling.
- Refactored useMapBookmarks and useToast composables to utilize readonly from Vue for better state management.
This commit is contained in:
2026-03-04 14:12:48 +03:00
parent fd624c2357
commit 337386caa8
7 changed files with 75 additions and 15 deletions

View File

@@ -1,6 +1,26 @@
import { ref, reactive, computed, watch, watchEffect, onMounted, onUnmounted, nextTick } from 'vue'
import {
ref,
reactive,
computed,
watch,
watchEffect,
onMounted,
onUnmounted,
nextTick,
readonly,
} from 'vue'
export { ref, reactive, computed, watch, watchEffect, onMounted, onUnmounted, nextTick }
export {
ref,
reactive,
computed,
watch,
watchEffect,
onMounted,
onUnmounted,
nextTick,
readonly,
}
export function useRuntimeConfig() {
return {