Eslint Reports“屏幕”在 @testing-library/vue中找不到屏幕。
我正在尝试使用@testing-library/vue
并导入屏幕方法,ESLINT报告了以下错误:“在 @testing-library/vue中找不到屏幕”
。
// The render function doesn't error but screen yes
import { render, screen } from '@testing-library/vue';
有人以前遇到过这个问题吗?我认为这是由于@testing-library/vue
re-Exports @testing-library/dom
方法,但我认为Eslint能够捡起它。
I'm trying to use @testing-library/vue
and import the screen method and ESLint reports the following error: "screen not found in @testing-library/vue"
.
// The render function doesn't error but screen yes
import { render, screen } from '@testing-library/vue';
Anyone came across this issue before? I think it's due to the fact that @testing-library/vue
re-exports @testing-library/dom
methods but I supposed that ESLint was able to pick that up.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
添加了
“@test-library/vue”
到我的types
内部tsconfig.json
,现在可以使用。Added
"@testing-library/vue"
to mytypes
Array insidetsconfig.json
and it now works.