Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login middleware refactor and tests #84

Merged
merged 15 commits into from
May 18, 2020
Merged

Login middleware refactor and tests #84

merged 15 commits into from
May 18, 2020

Conversation

JasonChong96
Copy link
Contributor

@JasonChong96 JasonChong96 commented May 15, 2020

Problem

General lack of automated tests for the repository and high degrees of coupling.

Closes [#83]

Solution

  • Refactor mail service and crypto service to be injected dependencies
  • Add tests for login middleware

Improvements:

  • Introduce coveralls integration for test coverage analysis
  • (Backend) Statements test coverage is now >23%
  • When OTP emails fail to send, an error is now logged.
  • Add common jest setup file for reflect-metadata import and mock config setup. This reduces code repetition across test suites.

Tests

  • Run npm run test

Deploy Notes

New dependencies:

  • coveralls : Coveralls integration

tsconfig.json Outdated Show resolved Hide resolved
Copy link
Contributor

@liangyuanruo liangyuanruo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm unless @yong-jie has any further suggestions. do resolve the merge conflicts.

package.json Outdated Show resolved Hide resolved
@JasonChong96 JasonChong96 requested a review from liangyuanruo May 18, 2020 05:29
Copy link
Member

@yong-jie yong-jie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants