After making changes, you should make sure they are working as expected and not breaking the existing unit tests.
To run the unit tests locally.
-
Go to the project root directory.
# navigate to the repository cd communication-services-authentication-hero-nodejs/
-
run the existing unit tests
You have 2 possibilities depending on displaying test coverage or not.
-
if you do not want to display the test coverage:
# Run UTs npm run test
-
if you do want to display the test coverage:
# Run UTs with coverage npm run test:coverage
-
Note: UTs are part of our CI pipeline, so failing UTs will result in repo build failure. Also, we defined a global test coverage threshold of 80% for branches, lines and statements. If the global coverage for any of them is below this threshold, UTs will fail.
- Next: Write Unit Tests
- Previous: Get Set up