Unit testing React components with shallow rendering A simple example of unit testing two React components in Mocha with shallow rendering npm install npm test