-
Notifications
You must be signed in to change notification settings - Fork 457
Add unit tests for signatures module - Closes #2445 #2682
Add unit tests for signatures module - Closes #2445 #2682
Conversation
Perhaps I'm wrong but the postSignatures function on the signatures module is not being used anywhere and after discussing with @jondubois it was probably meant for some other case we don't use now. Also, inside the function implementation:
the The unit tests skeleton then isn't coherent with the current implementation. What I did was instead, add unit testing coverage for the postSignature function which is indeed being used. Also removed outdated unit tests skeletons. |
@limiaspasdaniel you are right. There is a new relic definition for You are also right on your comment regarding |
test/unit/modules/signatures.js
Outdated
/* eslint-disable mocha/no-pending-tests */ | ||
/* eslint-disable no-unused-vars */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it important to keep?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible, please do not disable rules on file level. Disable the relevant lines instead with eslint-disable-next-line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test skeleton wasn't designed that good before. Please try to refactor it to have hooks and nested suites as less as possible.
test/unit/modules/signatures.js
Outdated
/* eslint-disable mocha/no-pending-tests */ | ||
/* eslint-disable no-unused-vars */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible, please do not disable rules on file level. Disable the relevant lines instead with eslint-disable-next-line
00735eb
to
355bb78
Compare
@yatki applied your suggested changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good. Just 2 minor comments.
355bb78
to
1669672
Compare
@yatki done, thanks :) |
54b0b4f
to
45c6688
Compare
45c6688
to
fc9ce23
Compare
Good job @limiaspasdaniel and @yatki on the review 👍 |
What was the problem?
Unit tests for signatures module weren't implemented
How did I fix it?
Implemented unit tests for signatures module
How to test it?
npm run mocha -- test/unit/signatures
Review checklist