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

Viewed 44

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.

1 Answers

Added "@testing-library/vue" to my types Array inside tsconfig.json and it now works.

Related