Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/will-wow/shallow-react-16
Sample code for a blog post about testing Hooks with `enzyme.shallow`.
https://github.com/will-wow/shallow-react-16
enzyme react shallow
Last synced: 11 days ago
JSON representation
Sample code for a blog post about testing Hooks with `enzyme.shallow`.
- Host: GitHub
- URL: https://github.com/will-wow/shallow-react-16
- Owner: will-wow
- Created: 2019-06-10T11:32:54.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-06-01T02:39:29.000Z (over 2 years ago)
- Last Synced: 2023-08-04T06:03:19.684Z (over 1 year ago)
- Topics: enzyme, react, shallow
- Language: JavaScript
- Homepage: https://blog.carbonfive.com/2019/08/05/shallow-testing-hooks-with-enzyme/
- Size: 1.8 MB
- Stars: 8
- Watchers: 2
- Forks: 7
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Shallow-Testing React 16
Sample code for a blog post about testing Contexts and Hooks with `enzyme.shallow`.
[https://react-authors-and-posts.surge.sh](https://react-authors-and-posts.surge.sh)
- [Example Test](/src/Authors.test.js)
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.
Open [http://localhost:3000](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](https://facebook.github.io/create-react-app/docs/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.