Used to manage user accounts of AWS Cognito.
We use NVM to control Node.js versions.
Make the nvm folder
mkdir ~/.nvm
Add to .bashrc:
# NVM
export NVM_DIR="$HOME/.nvm"
. "$(brew --prefix nvm)/nvm.sh"
Run this command to install nvm
.
brew install nvm
Check out this auto nvm script to make your life easier.
When upgrading Node be sure to change versions in .nvmrc
as well as .github\workflows\**\*
We use yarn
to manage packages. Run this command to install yarn
.
npm install -g yarn@1.22.21
You will want to make sure your node version matches the projects by running:
nvm use
You will then want to install all node packages. Run:
yarn install
In order to demo the project locally run:
yarn start
To lint and test run:
yarn test
To run unit testing to in watch mode run
yarn test:watch
We maintain 100% test coverage on this project. Coverage percentages will be printed to the terminal when you run yarn test
. This makes it easier for a code reviewer to determine if tests need to be worked on. Feel free to add coverage ignores for files or lines that given no value in unit testing. If the coverage is less than 100% on your branch, here's how you can find out which code is not yet being tested:
-
after running
yarn test
you will see that an untrackedcoverage
directory has been added to the root of the project. Copy the full path to theindex.html
file within thelcov-report
(it can be found somewhere likefile:///Users/your_name/projects_directory/admin/coverage/lcov-report/index.html
). -
using the coverage report in the browser, identify which files have less than 100% coverage for statements, branches, functions, or lines and write tests to cover those cases