Estimate ETA for Twiage Cases
- Install nvm:
macOS or Ubuntu using bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bashand then run
source ~/.bash_profileor
source ~/.zshrcand check if nvm is installed (v0.39.3)
nvm --versionIn case you get a nvm command not found message, add the following lines in the end of your ~/.bash_profile or ~/.zshrc:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm- Install Node 16:
nvm install 16 && nvm use 16install yarn
with brew:
brew install yarnwith npm
npm install -g yarnWe are using Jest as a testing framework.
We put out tests at the same directory with testing code.
__system-tests__ - directory name for system tests
__unit-tests__ - directory name for unit tests
WebStorm users can use run configuration.
yarn test:unitFor mac users
You need to install watchman using brew
brew update && brew install watchmanWebStorm users can use run configuration
yarn test:systemMake this lambda function handle individual location update.
-
We have red unit test for getLocation function under MongoManager. Implement code so test is no longer red.
-
distanceMatrixRequest method under distanceMatrixService is designed to use a special data structure. Refactor it so instead it takes 2 arguments: point A and point B
-
Add all necessary tests and implement code to handle individual location update
To add prod dependency
yarn add {DEPENDENCY}To add dev dependency (testing framework, build tool, assertion library linters etc)
yarn add -D {DEPENDENCY}To remove dependency
yarn remove {DEPENDENCY}