Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

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

mcrowder65 opened this issue Jan 29, 2019 · 2 comments

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

mcrowder65 opened this issue Jan 29, 2019 · 2 comments


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?


Copy link

Hi @mcrowder65!

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

Copy link

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
None yet

No branches or pull requests

2 participants