Skip to content

Latest commit

 

History

History
20 lines (11 loc) · 857 Bytes

File metadata and controls

20 lines (11 loc) · 857 Bytes

Lab2

Introduction

In this lab, you will write unit tests for functions implemented in main.js. You can learn how to use classes and functions by uncommenting their code. (But remember, don't commit them to GitHub)

Requirement

  1. Write test cases in main_test.js and achieve 100% code coverage. Remember to use Mock, Spy, or Stub when necessary; at least use one of them in your test cases. (100%)

You can run validate.sh in your local environment to test if you satisfy the requirements.

Please note that you must not alter files other than main_test.js. You will get 0 points if

  1. You modify other files to achieve the requirements.
  2. You can't pass all CI on your PR.

Submission

You need to commit and push the corresponding changes to your repository, which contains the code that satisfies the aforementioned requirements.