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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user