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

test(services): add tests for services #495

Merged
merged 3 commits into from
Aug 28, 2020
Merged

test(services): add tests for services #495

merged 3 commits into from
Aug 28, 2020

Conversation

LoneRifle
Copy link
Contributor

Provide test coverage for services

@LoneRifle LoneRifle requested a review from yong-jie August 27, 2020 09:22
- Refactor CloudmersiveScanService's dependencies so that they
  can be injected at runtime by inversify, rather than imported.
  This makes testing easier since we would not have to mess around
  with building mock classes for ScanApi
- Implement a comprehensive test for CloudmersiveScanService
`isThreat()` was evaluated as `safeBrowsingLogOnly && matches`.
This is incorrect as we want the result to always be false when
`safeBrowsingLogOnly`, and to be influenced by matches when
`!safeBrowsingLogOnly`. Correct this typo so that we can correctly
report SafeBrowsing results to the user.

Provide coverage test as part of the work done.
@LoneRifle LoneRifle marked this pull request as ready for review August 28, 2020 09:29
@LoneRifle LoneRifle merged commit 5cd2056 into develop Aug 28, 2020
@LoneRifle LoneRifle deleted the test/services branch August 28, 2020 09:54
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.

2 participants