Skip to content
abdelelbouhy edited this page Jun 3, 2018 · 28 revisions

Shipserv Coding Challenge

React app to display data to the user about bookings, itineraries, and other important info.

installation

This project is using node version 8. If node version 8 is running on your machine please skip the next step.

  1. install nvm curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash

Or

wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash

Then

export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"

  1. At the root folder run ./install.sh This shell script will install node version 8, the rquired npms, run the build and the webpack dev server

Or at the terminal run

If node 8 not installed

nvm install 8 &&

Then

nvm use 8 && npm i && npm run build && npm run start-dev

npm run build will run webpack and create bundle.js at dist/ directory

npm run start-dev runs webpack-dev-server and serve to localhost:8080

Running unit tests

The project is using Jest, enzyme and enzyme-to-json to creat snapshots At the terminal run npm run test