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(notification-service): added unit testcases #264

Merged
merged 6 commits into from
Sep 3, 2021

Conversation

ashutosh-bansal-2136
Copy link
Contributor

@ashutosh-bansal-2136 ashutosh-bansal-2136 commented Jul 14, 2021

gh-242

Description

Unit test cases added.

Fixes #242

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Intermediate change (work in progress)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • Performed a self-review of my own code
  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Any dependent changes have been merged and published in downstream modules

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

});

function setUp() {
channelManagerProvider = new ChannelManagerProvider();
Copy link
Contributor

Choose a reason for hiding this comment

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

can we add some default logic of channel manager in our test case

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added acceptance test cases for adding mock provider

});

function setUp() {
notificationUserProvider = new NotificationUserProvider();
Copy link
Contributor

Choose a reason for hiding this comment

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

again do we have any default impl for this ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added acceptance test cases for adding mock provider

@ashutosh-bansal-2136 ashutosh-bansal-2136 force-pushed the notification-tests branch 2 times, most recently from 8b65127 to d6a32e4 Compare August 18, 2021 12:10
"@sourceloop/core": "^2.0.1",
"@types/jsonwebtoken": "^8.5.4",
Copy link
Contributor

Choose a reason for hiding this comment

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

types should be moved to dev deps.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -16,5 +16,11 @@
"ENOENT": " no such file or directory, open '/home/samarpan/projects/loopback/loopback4-microservice-catalog/services/authentication-service/public/index.html'",
"The key 'sf.clientAuthentication.currentClient' is not bound to any value in context RequestContext-yWsyEvu3TeGuly75aFbRdg-13 (context": " RequestContext-yWsyEvu3TeGuly75aFbRdg-13, binding: sf.clientAuthentication.currentClient, resolutionPath: controllers.LoginController --> @LoginController.constructor[0])",
"Client Invalid": "Client Invalid",
"host is required": "host is required"
"host is required": "host is required",
Copy link
Contributor

Choose a reason for hiding this comment

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

these changes are not needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@sonarqubecloud
Copy link

sonarqubecloud bot commented Sep 3, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
20.7% 20.7% Duplication

@akshatdubeysf akshatdubeysf merged commit 6e650aa into master Sep 3, 2021
@akshatdubeysf akshatdubeysf deleted the notification-tests branch September 3, 2021 08:13
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.

Add Unit Tests for Notification Service
3 participants