繁体   English   中英

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

[英]ESLint reports "screen not found in @testing-library/vue"

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

// The render function doesn't error but screen yes
import { render, screen } from '@testing-library/vue';

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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM