I've been working on an Angular 10 CLI project (v10.1.2) and recently installed
@testing-library/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="01606f66746d60734130312f312f33">[email protected]</a>
. I'm really interested in using the convenient matchers like .toBeInTheDocument()
, but I'm a bit stuck because I'm running Karma with Jasmine (configured via Angular) and Typescript. How can I get the @testing-library/jasmine-dom
matchers installed?
I attempted to follow the latest version's instructions (v1.1.0), and although I can see the matchers on the HTMLMatchers
type in VSCode, I'm having trouble actually adding them. When I try to import them with
import JasmineDOM from '@testing-library/jasmine-dom';
, I receive an error stating that File C:/.../node_modules/@types/testing-library__jasmine-dom/index.d.ts
is not a module.
Given that this project is an Angular CLI setup with Jasmine running under Karma, do you think it would be more practical to use a Karma plugin instead? (I haven't come across any yet...)