-
Notifications
You must be signed in to change notification settings - Fork 103
Open
Labels
Description
Environment
- Operating System: Linux
- Node Version: v22.14.0
- CLI Version: 3.27.0
- Nitro Version: 2.12.4
- Package Manager: [email protected]
- 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.oskarols, Romainpetit, DiagoSmith, delphinemillet, arturmiglio and 6 more