👨‍💻
Community Resources
  • Welcome!!
  • Blockchain Resources
  • Web Development
  • A to Z Resources
  • Best GitHub Repos
  • MEAN & MERN Stack
  • React, Redux and ES6
    • basic-concepts
    • boilerplates-and-starter-kits
    • community-resources
    • es6-features
    • flux-tutorials
    • functional-programming
    • git-resources
    • immutable-data
    • javascript-resources
    • node-js-and-npm
    • pros-cons-discussion
    • react-performance
    • react-redux-architecture
    • react-redux-testing
    • react-styling
    • react-tutorials
    • react-vs-backbone
    • redux-side-effects
    • redux-techniques
    • redux-tutorials
    • thinking-in-react-and-flux
    • tips-and-best-practices
    • using-react-with-es6
    • webpack-advanced-techniques
    • webpack-tutorials
  • NodeJS
  • React Native
  • Mixed PDFs
  • AI/ML/DL
Powered by GitBook
On this page

Was this helpful?

  1. React, Redux and ES6

react-redux-testing

Previousreact-redux-architectureNextreact-styling

Last updated 4 years ago

Was this helpful?

  • Approaches to Testing React Components A great starting point to testing, looking at the main ways you can test component structure and state handling

  • Simple React/Redux Testing Looks at how to test rendering, behavior, and state of an application

  • Test Driven React Tutorial Describes project setup and basic approaches, using the common stack of Webpack+Karma+Mocha+Chai+Sinon

  • How to Test React.js Components Covers what to test, and how to test things like props and shallow rendering

  • Unit Testing a Redux App Example ways to test pieces of a Redux app, including actions, reducers, and middleware

  • React-Boilerplate Testing Docs Useful description of how to use Mocha, Expect, and Enzyme to test React and Redux code

  • Testing React Applications A long, in-depth article describing approaches and use of Tape, React TestUtils, and Enzyme

  • TDD and React Components Detailed example of using TDD to design and develop a React component, using Teaspoon for testing

  • Testing Redux Applications A great writeup on how to specifically deal with testing pieces of a Redux app. The "Getting Testy" post series also has a lot of really good idea on how to go about writing tests and what kinds of things should be tested.

  • Testing with Mocha and Webpack Some excellent information on setting up a good test environment, including use of the mocha-webpack tool.

  • Testing React Components with Teaspoon and Unexpected A short but useful look at a couple testing libraries and ways to use them.

  • Unit Testing React Components and Redux Reducers Some basic examples for testing reducers and components.

  • Getting Started with TDD in React Covers a typical Mocha+Chai+JSDOM+Enzyme setup, talks about why/how/what to test, and walks through several examples.

  • Testing React Applications A fantastic talk that goes through many important details of trying to test React components under JSDOM.

  • Testing in React: Getting Off the Ground A look at approaches and ways to start testing React components

  • Testing React and Redux A three-part article that shows how to set up Ava and Babel, then walks through testing Redux code (action creators, reducers, selectors, thunks, and sagas), and React components.

  • Testing React Applications Examples A repo showcasing how to test various parts of a common React/Redux app using Mocha, expect and enzyme

  • Unit Testing Redux Container Components Demonstrates techniques for properly testing Redux-connected React components using a mock store.

General Testing, Tools, and Setup

Javascript Testing: Unit vs Functional vs Integration A comparison of the various levels of tests you can run, and what roles they play in development.

Reddit - "Karma/Mocha/Chai/Sinon setup" Reddit user Cody_Chaos describes his approach to running unit tests under Node with Mocha, and integration tests in a browser with Karma. Includes several useful config setup snippets.

Setting Up Javascript Testing Tools for ES6 Tips on configuring tools to work with ES6 code, and writing tests using ES6

Keep Calm and Love Javascript Unit Tests - Part 2: Asynchronism Useful tips for testing asynchronous behavior under Mocha.

ESLint Part 1: Exploration A solid look at what ESLint is, how you can use it to help keep your code clean, and a number of useful linting plugins that are available.

Keep Calm and Love Javascript Unit Tests An introduction to using Mocha, Chai, and Sinon to write unit tests for various scenarios.

http://reactkungfu.com/2015/07/approaches-to-testing-react-components-an-overview/
https://medium.com/@caljrimmer/simple-react-redux-testing-cd579d4c2103
http://spencerdixon.com/blog/test-driven-react-tutorial.html
https://nemisj.com/how-to-test-react-js-components/
https://www.codementor.io/reactjs/tutorial/redux-unit-test-mocha-mocking
https://github.com/mxstbr/react-boilerplate/blob/v3.0.0/docs/testing/unit-testing.md
https://github.com/mxstbr/react-boilerplate/blob/v3.0.0/docs/testing/component-testing.md
http://12devsofxmas.co.uk/2015/12/day-2-testing-react-applications/
https://medium.com/@nackjicholsonn/tdd-and-react-components-5ae5a9a5a7bf
http://randycoulman.com/blog/2016/03/15/testing-redux-applications/
http://randycoulman.com/blog/categories/getting-testy/
http://randycoulman.com/blog/2016/03/22/testing-with-mocha-and-webpack/
http://randycoulman.com/blog/2016/04/05/more-on-testing-with-mocha-and-webpack/
http://dchambers.github.io/articles/testing-react-components-with-teaspoon-and-unexpected/
http://pebblecode.com/blog/react-redux-unit-testing/
https://semaphoreci.com/community/tutorials/getting-started-with-tdd-in-react
https://youtu.be/KBhHsYlF4mQ
https://medium.com/javascript-inside/testing-in-react-getting-off-the-ground-5f569f3088a
http://silvenon.com/testing-react-and-redux/
https://github.com/mxstbr/react-testing
http://pebblecode.com/blog/testing-redux-containers/
https://www.sitepoint.com/javascript-testing-unit-functional-integration/
https://www.reddit.com/r/javascript/comments/4217x6/ive_spent_six_hours_attempting_to_set_up/
http://x-team.com/2016/05/setting-up-javascript-testing-tools-for-es6/
http://www.theodo.fr/blog/2016/06/keep-calm-and-love-javascript-unit-tests-part-2-asynchronism/
https://blog.scottnonnenberg.com/eslint-part-1-exploration/
http://www.theodo.fr/blog/2016/04/keep-calm-and-love-javascript-unit-tests-part-1/
http://www.theodo.fr/blog/2016/06/keep-calm-and-love-javascript-unit-tests-part-2-asynchronism/