Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 1.34 KB

File metadata and controls

43 lines (31 loc) · 1.34 KB

Contribution Guides

  1. Get Set up
  2. Test Your Changes
  3. Write Unit Tests
  4. Submit a PR
  5. Publish Your Changes

2. Test Your Changes

Test locally

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.

  1. Go to the project root directory.

    # navigate to the repository
    cd communication-services-authentication-hero-nodejs/
  2. run the existing unit tests

    You have 2 possibilities depending on displaying test coverage or not.

    1. if you do not want to display the test coverage:

      # Run UTs
      npm run test
    2. 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.