Closed
Description
Bug:
On a VueJS project, using the npm install command and basic import statement ( import { render, fireEvent, cleanup } from '@testing-library/vue']) raises an error:
- Could not find a declaration file '@testing-library/vue'
The error recommends installing @types/testing-library__vue. But attempting to install this provides another error message:
- @types/testing-library__vue@latest is not in the npm registry.
To reproduce:
- Spin up a vue app with Jest as the default testing provider and use typescript
- Open a .spec.ts file
- Run the npm install for vue testing library
- Add import { render, fireEvent, cleanup } from '@testing-library/vue';
- IDE picks out import library as an error, npm run test will no longer run successfully
- Installing the suggested library @types/testing-library__vue --save-dev is unsuccessful
Related information:
@testing-library/vue
version: ^1.1.0Vue
version: ^2.6.10node
version: 10.15.3npm
version: 6.9.0
Related code/config:
- Using typescript