/testing-react-hooks-workshop

Testing React hooks workshop

Primary LanguageTypeScript

How to test React hooks

To get started, install npm packages with npm ci.

1. Testing React hooks

Run dev server with npm run start:part-1 then open http://localhost:1234

Run tests with npm run test:part-1.

2. Testing custom React hooks

Run dev server with npm run start:part-2 then open http://localhost:1234

Run tests with npm run test:part-2.

3. Testing custom hook that uses fetch

Only tests are available: npm run test:part-3.