Test React with react-testing-library
Clone or download
Latest commit 3df9165 Sep 9, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
src remove console log Sep 9, 2018
.gitignore add package-lock.json Sep 5, 2018
README.md mock component Sep 8, 2018
index.js add index.js May 10, 2018
package-lock.json mock component Sep 8, 2018
package.json add redux and react router examples Sep 8, 2018



Course material for testing React components using react-testing-library

I'm still working on the README. But here's the order these should be given in:

  • react-dom.js - Render a React component for testing
  • jest-dom.js - Use jest-dom for improved assertions
  • dom-testing-library.js - Use dom-testing-library to write more maintainable React tests
  • react-testing-library.js - Use react-testing-library to render and test React Components
  • localized.js - Testing localized content with react-testing-library
  • state.js - Test React Component state changes with react-testing-library
  • prop-updates.js - Test prop updates with react-testing-library
  • a11y.js - Test accessibility of rendered React Components with jest-axe
  • dependency-injection.js - Mock HTTP Requests with Dependency Injection in React Component Tests
  • http-jest-mock.js - Mock HTTP Requests with jest.mock in React Component Tests
  • mock-component.js - Mock react-transition-group in React Component Tests with jest.mock
  • error-boundaries.js - Test componentDidCatch handler error boundaries with react-testing-library
  • tdd-markup.js - Test drive the development of a React Form with react-testing-library
  • tdd-functionality.js - TDD the functionality of a React Form with react-testing-library
  • react-router-provider.js - Test react-router Provider history object in React Component Tests with createMemoryHistory
  • redux.js - Test a redux connected React Component
  • render-props.js - Test a render prop component using a Jest spy function
  • portals.js - Test React portals with react-testing-library’s within API
  • unmounting.js - Test Unmounting a React Component with react-testing-library