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

Add unit test cases to achieve full coverage #2

Merged
merged 5 commits into from
Jun 28, 2021
Merged

Add unit test cases to achieve full coverage #2

merged 5 commits into from
Jun 28, 2021

Conversation

jeandek
Copy link
Contributor

@jeandek jeandek commented Jun 25, 2021

Description of changes:
This PR is adding two additional unit test cases to achieve 100% coverage. It also updates the npm test script to calculate coverage.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

__tests__/index.test.js Outdated Show resolved Hide resolved
@jenirain
Copy link
Contributor

We may also want to add some details in CONTRIBUTING.MD in the ## Testing the code section:
user should do npm install of:
jest
pino
jsonwebtoken
jwk-to-pem
axios

They need these installed or tests will fail. (if you feel that this is overly obvious, it's ok to leave it out)

@jeandek
Copy link
Contributor Author

jeandek commented Jun 28, 2021

We may also want to add some details in CONTRIBUTING.MD in the ## Testing the code section:
user should do npm install of:
jest
pino
jsonwebtoken
jwk-to-pem
axios

They need these installed or tests will fail. (if you feel that this is overly obvious, it's ok to leave it out)

It's fairly obvious to any experience Node.JS developer, but I'll add some setup instructions regardless.

@jenirain
Copy link
Contributor

IntelliJ tells me that at line 13, we should invoke the superclass constructor. I know in Java this is a best practice, but - as you know - I'm not well versed in js. Do we want to add a call to super() at line 13 - before return DATE; ?

@jeandek
Copy link
Contributor Author

jeandek commented Jun 28, 2021

IntelliJ tells me that at line 13, we should invoke the superclass constructor. I know in Java this is a best practice, but - as you know - I'm not well versed in js. Do we want to add a call to super() at line 13 - before return DATE; ?

Good catch, that's a good practice in JS as well.

@jeandek jeandek merged commit 840591f into awslabs:main Jun 28, 2021
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