8000 GitHub - klh/stuff
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

klh/stuff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code samples

How to run and test

created with node 10.8.3 npm 6.4.1 yarn 1.12.3

Build it:

yarn install && yarn run build

fire up 3 different terminals and run:

yarn run test
  • this wil start the jest + enzyme test to run through the test cases, I do not normally test components to death, but normally implement end-end testing to catch logic & implementation errors.
  • i believe in sanity and informed choice. Running snapshot testing of components can to a very large degree cover most test cases (that is if you create you components atomically)
  • Normally i'd implement a Visual Diff engine on top of Casper or another Headless browser to catch all Style regression and errors.
  • too see how this works in practice change the padding in WidgetWrapper.css to 0 while tests are running
yarn run storybook
  • this will run and launch storybook - my prefered way of working with components as I'm a fan of Storybook Driven Development
  • In order to demonstrate how that works, i've exploded the component in a a few more subcomponents that is strictly necessary, and i've added a generic button you can examine as well
yarn run start
  • This will run the application as an isomorphic SSR application and launch 2 servers 1 is the basic server of the client assets (your typical serve -s server) 2 the other runs an express app that hydrates the react app in order to support the usecase of working without javascript

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0