我尝试使用@testing-library/vue并导入屏幕方法,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能够做到这一点。
发布于 2022-06-24 09:20:55
将"@testing-library/vue"添加到types数组中的tsconfig.json中,现在它可以工作了。
https://stackoverflow.com/questions/72741227
复制相似问题