This project uses web-react-components libary to convert react project to web-component.
Unit tests are run using Jest and are written using react testing library and enzyme.
Integration tests are written and run using cypress automation framework.
sh build.sh
This creates js files in dist directory for each webcomponent we are exporting.
cd testable-webcomponent
npm test
We can find the test results under test-result directory and coverage report under coverage directory
Start Web Server
brew update
brew install nginx
Edit vi /usr/local/etc/nginx/nginx.conf to locate dist directory of webcomponents
location ~* \.(js|jpg|png|css)$ {
root <path/to/cloned_location>/micro-front-ends/testable-webcomponent/dist;
}
cd react-host-app
npm install
npm start
npm run it-test