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 | bash
and then run
source ~/.bash_profile
or
source ~/.zshrc
and check if nvm is installed (v0.39.3)
nvm --version
In 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 16
install yarn
with brew:
brew install yarn
with npm
npm install -g yarn
We 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:unit
For mac users
You need to install watchman using brew
brew update && brew install watchman
WebStorm users can use run configuration
yarn test:system
Make 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}