menu

Testing Library

Simple and complete DOM testing utilities that encourage good testing practices.

Channels
Chat
view-forward
# All channels
view-forward
# General
view-forward
# General Help
view-forward
# Angular Help
view-forward
# Cypress Help
view-forward
# DOM Help
view-forward
# React Help
view-forward
# TestCafe Help
view-forward
# Vue Help
view-forward
Team
Posts
Chat
Members
Info
down-caret

Strange behavior

yields but if I change the expect to: yields

thumbsup
0
message-simple
1

Help with testing the display and compliance of the icon

I need to check whether the icon (svg) that I downloaded is displayed and whether it matches the one that I downloaded Thanks!

thumbsup
0
message-simple
1

Ask Me Anything about Testing

Hey folks! Do you have any questions about testing? I'm hosting a livestream tomorrow! I'd love for as many of you to be there asking questions as you can. Learn more about the livestream and feel free to start asking on this twitter…

thumbsup
0
message-simple
10

Help with testing react-date-picker

I am really struggling to test a component having react-date-picker in it. I think the onChange event isn't triggered when fireEvent.Change is used to change the content of react date picker. Any help would much appreciated. Thanks.

thumbsup
0
message-simple
1

Access elements in shadow root

Hey everyone, I have one question which came up during developing a component lately. Is it somehow possible to access shadow DOM elements with the test lib? Thanks!

thumbsup
0
message-simple
0

Testing functional component methods + typescript

Quite new to writing tests, and have to also jump in the deep end with doing it in Typescript on a project I have some functional component methods placed inside the function that I want to spy on to check if they are called with correct props after a user has performed an…

thumbsup
0
message-simple
9

When to use integration tests over e2e tests?

Hey! Yesterday I tested a feature which required me to mount multiple components and link them via a store and router (in vue). The setup was quite complex and there was a problem with the router which did not call the in-component guards. So I had to manually simulate these…

thumbsup
0
message-simple
7

React-Redux Testing issue

I have a component that I am testing that is using redux, so I looked in RTL and saw the example with redux. I setup 3 tests. If I run this, the 1st and 2nd times are correct, however in the 3rd test which is the same as the 1st it fails and the value is $0. If I comment out the…

thumbsup
0
message-simple
3

How do you test error boundaries?

I have a jest test which checks whether an error is caught by an error boundary. My test runs to completion, passing all the expect()s, but jest still throws an error on the console. I can't work out whether the React component is not consuming the error. Maybe that's a React…

thumbsup
0
message-simple
1

Did getByText change recently?

I have some HTML that looks like this: And we are using a test that does: It used to work fine, but now it's telling me it can't find that phone number. If I switch to doing a RegExp it works, but I'm curious to see if I'm just doing something wrong.

thumbsup
0
message-simple
0