I want to test a component using the useNuxtApp composable.
This is the component(MyComponent.vue):
<template>
<div class="flex justify-between">
<span>{{ $fmt(12) }}</span>
</div>
</template>
<script lang="ts" setup>
const { $fmt } = useNuxtApp()
</script>
$fmt is a plugin in plugins folder.
The problem is when I try to test MyComponent.vue with vitest, the test is not started and this error appears:
ReferenceError: useNuxtApp is not defined
I don't know how to mock the useNuxtApp composable