Giter Club home page Giter Club logo

awesome-react-testing's Introduction

Awesome All Contributors

Awesome React Testing

A collection of React and React Native testing tools and strategies.

Table of Contents

Tutorials

For web:

For React Native:

Unit Testing

Choose one of these to be the primary framework you will be using to test your React and React Native apps. The most popular, by far, is Jest.

Jest

Website: https://jestjs.io/ Works on projects using: Babel, TypeScript, Node, React, Angular, Vue and more. Based on Mocha Cheatsheet: https://github.com/sapegin/jest-cheat-sheet

Fetch Mock

More on Jest at AWESOME-JEST

Other Frameworks

  • mocha - Simple, flexible, fun javascript test framework for node.js & the browser.
  • jasmine - DOM-less simple JavaScript testing framework.
  • qunit - An easy-to-use JavaScript Unit Testing framework.
  • prova - Node & Browser test runner based on Tape and Browserify
  • DalekJS - Automated cross browser functional testing with JavaScript
  • Protractor - Protractor is an end-to-end test framework for AngularJS applications.
  • tape - Tap-producing test harness for node and browsers.
  • TestCafe - Automated browser testing for the modern web development stack.
  • ava - ๐Ÿš€ Futuristic JavaScript test runner
  • intern - A next-generation code testing stack for JavaScript.

Assertion

Assertion libraries give you tools to ensure things are correct. For example, they may give you matchers such as expect(true).toBeTruthy().

  • chai - BDD / TDD assertion framework for node.js and the browser that can be paired with any testing framework.
  • chai-immutable
  • Enzyme - Enzyme is a JavaScript Testing utility for React that makes it easier to assert, manipulate, and traverse your React Components' output.
  • react testing library - Simple and complete React DOM testing utilities that encourage good testing practices.
  • Sinon.JS - Test spies, stubs, and mocks for JavaScript.
  • expect.js - Minimalistic BDD-style assertions for Node.JS and the browser.
  • React Unit - Lightweight unit test library for ReactJS
  • skin-deep - Testing helpers for use with React's shallowRender test utils.
  • Unexpected React - Plugin for http://unexpected.js.org to enable testing the full React virtual DOM.

Browser-based Testing Tools

These allow you to run tests right in a real browser, to build full integration tests.

  • phantomjs - Scriptable Headless WebKit.
  • slimerjs - A PhantomJS-like tool running Gecko.
  • casperjs - Navigation scripting & testing utility for PhantomJS and SlimerJS.
  • zombie - Insanely fast, full-stack, headless browser testing using node.js.
  • totoro - A simple and stable cross-browser testing tool.
  • karma - Spectacular Test Runner for JavaScript.
  • nightwatch - UI automated testing framework based on node.js and selenium webdriver.
  • yolpo - A statement-by-statement javascript interpreter in the browser.

Snapshot Testing

These tools allow you to take "snapshots" of components and other data and verify that it remains the same between updates.

For web:

For React Native:

Blackbox Testing

These tools allow you to write end-to-end integration tests -- without having any insight into the implementation details.

For React Native:

Greybox Testing

These tools are like the blackbox testing tools, except they integrate with internals of the web app to provide more consistency.

For web:

For React Native:

Linters and Formatters

Linters catch errors and protect against common problems. Formatters will reformat your code to ensure consistency.

Linters

Formatters

A11y (accessibility)

Maintenance Managers

These tools automate tedious tasks like dependency upgrades.

Environment Helpers

These packages help you verify that your environment matches the expected environment for the project (for example, Node versions, etc).

Performance

Performance tools help you get the most speed out of your React and React Native apps.

For web:

Quality Checks

These tools will check for code quality scores.

Coverage Reporting

Coverage tools will alert you when you have untested code.

  • CodeCov - Coverage reporting service.
  • istanbul - Yet another JS code coverage tool.
  • blanket - A simple code coverage library for javascript. Designed to be easy to install and use, for both browser and nodejs.
  • JSCover - JSCover is a tool that measures code coverage for JavaScript programs.

Chaos Testing

Chaos testing ensures your tests are resilient to random data and interaction.

For web:

For React Native:

Production Checking / Testing

These tools will allow you to see errors that happen in production apps.

For web:

For mobile:

Audits

Auditing tools will give you information about your code structure.

For web:

Contributors

Thanks goes to these wonderful people (emoji key):

Gant Laborde
Gant Laborde

๐Ÿ“–
Jamon Holmgren
Jamon Holmgren

๐Ÿ–‹ ๐Ÿค”

This project follows the all-contributors specification. Contributions of any kind welcome!

awesome-react-testing's People

Contributors

danielmschmidt avatar gantman avatar jamonholmgren avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.