New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standard rendering as a catch-all test, thoughts? #561

mcrowder65 opened this Issue Jan 29, 2019 · 2 comments


None yet
2 participants
Copy link

mcrowder65 commented Jan 29, 2019

Hey Kent! 馃憢

Just another javascript developer who migrated their entire test suite to react-testing-library from enzyme, and we love it so far.

Just wondering your thoughts on something:

A pattern that I have decided to do is always just render a component without even checking for anything, just to ensure that it renders, this mainly catches things like if file imports broke or if perhaps you're not checking for an undefined variable.


import React from "react";
import MyComponent from "../my-component";
import { cleanup } from "react-testing-library";
// this is just a wrapped render our react-testing-library render that wraps all of our providers - React intl, material-ui, redux, apollo, etc.
import { render } from "client/../../test/test-utils";


test("that it renders without issues", () => {

And this will just be the first line of defense to ensure that we have something that's checking something on the component.

Just wondering what your thoughts are and if this something dumb or not?



This comment has been minimized.

Copy link

kentcdodds commented Jan 29, 2019

Hi @mcrowder65!

This is a great question! Here's my answer:

@kentcdodds kentcdodds closed this Jan 29, 2019


This comment has been minimized.

Copy link

mcrowder65 commented Jan 29, 2019

Thank you Kent! Very useful, +1 to, I really enjoyed the react-testing-library section, still need to make my way through the cypress one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment