-
Notifications
You must be signed in to change notification settings - Fork 101
Open
Labels
Description
Environment
- Operating System: Linux
- Node Version: v22.14.0
- CLI Version: 3.27.0
- Nitro Version: 2.12.4
- Package Manager: npm@11.4.1
- nuxt Version: 4.0.2
@nuxt/test-utils
: ^3.19.2vitest
: ^3.2.4@vue/test-utils
: ^2.4.6vue
: ^3.5.17
Reproduction
<script setup lang="ts">
const { error = false } = defineProps<{ error?: boolean }>()
</script>
### Describe the bug
When testing Nuxt components written using `<script setup>` and destructured `defineProps()`, calling `wrapper.setProps(...)` causes a Vue runtime warning and the test fails.
### Additional context
_No response_
### Logs
```shell-script
[Vue warn]: Cannot mutate <script setup> binding "error" from Options API.