Skip to content
Sample code for a blog post about testing Hooks with `enzyme.shallow`.
JavaScript HTML CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
src add HelloWorld example Jul 16, 2019

Shallow-Testing React 16

Sample code for a blog post about testing Contexts and Hooks with enzyme.shallow.

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

npm test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

npm format

Run prettier and auto-format all the code.

npm build

Build a prod version to the build directory.

npm deploy

Deploy the build directory to surge.

You can’t perform that action at this time.