Table of Contents
- Getting Started
- Introduction to React
- Setting Up the Project
- Implementing a Note Application
- Deleting Notes
- Understanding React Components
- Editing Notes
- Styling the Notes Application
- Implementing Kanban
- React and Flux
- Implementing NoteStore and NoteActions
- Implementing Persistency over localStorage
- Handling Data Dependencies
- Editing Lanes
- Implementing Drag and Drop
- Advanced Techniques
- Typing with React*
- Styling React
- Structuring React Projects
- Language Features
- Understanding Decorators
- The missing piece to the React testing puzzle
- How Algolia unit tests React components using expect-jsx
- chai-enzyme - Chai.js assertions and convenience functions for testing React Components with enzyme
- CodeceptJS - Acceptance testing for Node.js
- CSS Modules, Webpack and Testing
- How to get fast unit tests with(out) Webpack
In order to encourage people to support my work, I've decided to publish a TL;DR version of this chapter for the community. This will allow me to develop more content, so it's a win-win really.
You can access the full chapter by buying a copy through Leanpub. It goes into detail, whereas the following should give you a rough idea of the chapter contents.
- Basic testing techniques include unit testing, acceptance testing, property based testing, and mutation testing.
- Unit testing allows us to ascertain specific certain truths.
- Acceptance testing allows us to test qualitative aspects of our system.
- Property based testing (see QuickCheck) is more generic and allows us to cover a wider range of values more easily. These tests are more difficult to write, though.
- Cesar Andreu's web-app has a nice testing setup (Mocha/Karma/Istanbul).
- Code coverage helps us to understand what parts of the code remain untested. It does not, however, give us any guarantees of the quality of our tests.
- React Test Utilities give us a nice way to write unit tests for components. There are lighter APIs, such as jquense/react-testutil-query.
- Alt provides a good means for testing actions and stores.
- Testing provides you confidence. This will become particularly important as your codebase grows. It will become harder to break things inadvertently.
Buy the book for more detail.
This book is available through Leanpub. By purchasing the book you support the development of further content.