首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ESLint报告“在@testing library/vue中找不到屏幕”

ESLint报告“在@testing library/vue中找不到屏幕”
EN

Stack Overflow用户
提问于 2022-06-24 08:35:58
回答 1查看 73关注 0票数 1

我尝试使用@testing-library/vue并导入屏幕方法,ESLint报告了以下错误:"screen not found in @testing-library/vue"

代码语言:javascript
复制
// The render function doesn't error but screen yes
import { render, screen } from '@testing-library/vue';

以前有人见过这个问题吗?我认为这是因为@testing-library/vue重新导出了@testing-library/dom方法,但我认为ESLint能够做到这一点。

EN

回答 1

Stack Overflow用户

发布于 2022-06-24 09:20:55

"@testing-library/vue"添加到types数组中的tsconfig.json中,现在它可以工作了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72741227

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档