Category "testing-library"

How to test that my input has a ref attribute?

I am using React Testing Library and I have a component that takes in a prop value for a ref that will be used within a <input />. const InputComp = (ref)

React Testing Library: how to use screen in this case instead of container

in react testing library, as per the conventions, it is better to use screen than to destructure the methods from render. I have a component, where I need to te

How to test Custom Elements / Web Components with Testing-Library, Jest and JSDOM?

I am trying to test an Angular app with testing-library/angular@11 and [email protected] which uses custom-elements quite heavily. Unfortunately I am not quite sure i

Testing Svelte components with dynamically imported components in jest (await import)

I'm writing a test in jest for a svelte component which dynamically imports another component. The following snippet is the part where the dynamic import happen

How to use Vue Testing Library with Nuxt.js?

I want to use Vue Testing Library in my Nuxt.js app. But straight after installing the package, launching a test triggers this error: 'vue-cli-service' is not

How to test Material UI v5 components with sx props in @testing-library/react?

React Testing Library does not apply sx props of Material UI components during rendering. For example, I specify properties to hide an element at certain breakp