Skip to content
This repository has been archived by the owner on Sep 9, 2021. It is now read-only.

Add unit tests #74

Closed
8 tasks done
rekmarks opened this issue Jan 26, 2021 · 1 comment · Fixed by #126
Closed
8 tasks done

Add unit tests #74

rekmarks opened this issue Jan 26, 2021 · 1 comment · Fixed by #126
Assignees

Comments

@rekmarks
Copy link
Member

rekmarks commented Jan 26, 2021

We should add unit tests via jest. We should test the command line interface apart from the command implementations.

  • Add jest, related dependencies, and MetaMask's jest eslint config
  • Add command line interface tests
  • Add command handler unit tests
  • Add miscellaneous unit tests
  • Colocate tests
  • Migrate tests to TypeScript
  • Achieve 100% line, function, and statement coverage
  • Achieve >85% branch coverage
    • I moved the goal posts here from 95%. We can perfect it later.
@rekmarks
Copy link
Member Author

rekmarks commented Apr 26, 2021

Pending #102.

@rekmarks rekmarks self-assigned this Apr 28, 2021
rekmarks added a commit that referenced this issue Sep 6, 2021
Closes #74.

This PR adds unit tests for `cli.ts`, and achieves 100% coverage for everything except branches, which are left at 86%. The lower branch coverage is mainly due to solitary `if` statements whose implicit `else` clauses are never tested.

In order to achieve the increased test coverage, some internal files have been refactored. All changes should be non-breaking.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant