Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Types of property 'emits' are incompatible #2538

Closed
Oleksii14 opened this issue Mar 22, 2023 · 1 comment
Closed

Types of property 'emits' are incompatible #2538

Oleksii14 opened this issue Mar 22, 2023 · 1 comment
Labels
good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first upstream

Comments

@Oleksii14
Copy link

Oleksii14 commented Mar 22, 2023

Hi!

I updated the dependencies in my project recently and now I have some issues in my unit tests.
See example in the repo - https://github.com/Oleksii14/volar-vitest

Steps to reproduce:

  • clone the repo
  • yarn install
  • visit the HelloWorld.spec.ts, and see the error under HelloWorld that is provided to shallowMount.

Unit test code:

image

Component code:

image

Also, when you uncomment defineEmits([] as string[]);, it will fix the issue

@johnsoncodehk
Copy link
Member

Thanks for the repro case, this is DefineComponent type and @vue/test-utils issue, please track vuejs/test-utils#2026.

@johnsoncodehk johnsoncodehk added upstream good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first labels Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good reproduction ✨ This issue provides a good reproduction, we will be able to investigate it first upstream
Projects
None yet
Development

No branches or pull requests

2 participants