xxxx-extra
v0.0.17
Published
asdfasdfas
Downloads
7
Readme
React interactive components
Test the components Storybook
Development tools requirements
- Npm 5.3.0
- Node 8.6.0
Developing
Components are developed using StoryBook.
You can run either npm start
or npm run build:storybook
to start the project.
Building
There are 2 building scripts included
npm run build
: It will compile all TypeScript code into acompiled
folder, and will run 3 different build scripts for distribution (dist
folder), es modules (es
folder) and npm modules (lib
folder)npm run build:storybook
: It will create astorybook-static
folder that can be deployed to a server to dislay all components built
Testing
Scripts:
npm test
npm run test:watch
npm run test:coverage
For guidelines on how to test components and what to (and not to) test, please read the following article:
https://medium.freecodecamp.org/the-right-way-to-test-react-components-548a4736ab22
This project uses Jest as the main testing framework and Enzyme for validating React component's outputs.
- Jest's main website: http://airbnb.io/enzyme/
- Jest's Expect api: https://facebook.github.io/jest/docs/en/expect.html
- Jest's Mock api: https://facebook.github.io/jest/docs/en/mock-function-api.html
- Enzyme's main website: http://airbnb.io/enzyme/
- Enzyme's api (for shallow rendering): http://airbnb.io/enzyme/docs/api/shallow.html
Stack
Started from https://github.com/rokoroku/react-redux-typescript-boilerplate