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

🐛 BUG: @astrojs/language-server v2.7.6 not honouring Vue defineExpose in test files #817

Open
spacedawwwg opened this issue Mar 8, 2024 · 2 comments
Labels
- P3: minor bug An edge case that only affects very specific usage (priority) feat: vue Related to the Vue integration (scope)

Comments

@spacedawwwg
Copy link

Describe the Bug

After upgrading to @astrojs/language-server v2.7.6, astro check fails in my test files (e.g. Mycomponent.spec.ts) when using @vue/test-utils and defineExpose

Steps to Reproduce

  1. npm init astro using template
  2. set up using Vue integration
  3. add a defineExpose to a vue file
  4. try to use said expose (e.g. wrapper.vm.myExposedThing)
  5. IDE typescript picks up the expose
  6. run astro check
  7. type check errors
@namespace/package-name:typecheck: > astro check --tsconfig tsconfig.check.json
@namespace/package-name:typecheck: 15:02:41 [check] Getting diagnostics for Astro files in
@namespace/package-name:typecheck:
@namespace/package-name:typecheck: src/components/ComponentName/__tests__/ComponentName.unit.test.ts:58:23 - error ts(2339): Property 'active' does not exist on type 'ComponentPublicInstance<ComponentNameProps, Omit<{ items: string[]; }, keyof ComponentNameProps>>'.
@namespace/package-name:typecheck: 
@namespace/package-name:typecheck: 58     expect(wrapper.vm.active.title).toBe('test');
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Mar 8, 2024
@spacedawwwg
Copy link
Author

Locked in at v2.7.5 for now as this is working

@spacedawwwg
Copy link
Author

Just following up – Is it likely this will be triaged at any time soon?

@Princesseuh Princesseuh added - P3: minor bug An edge case that only affects very specific usage (priority) feat: vue Related to the Vue integration (scope) and removed needs triage Issue needs to be triaged labels May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P3: minor bug An edge case that only affects very specific usage (priority) feat: vue Related to the Vue integration (scope)
Projects
None yet
Development

No branches or pull requests

2 participants