Skip to content

Conversation

@Ngwerume
Copy link
Contributor

No description provided.

@codacy-production
Copy link

codacy-production bot commented Nov 28, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 76b8a041
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (76b8a04) Report Missing Report Missing Report Missing
Head commit (0a7b699) 12 12 100.00%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

it('should throw error when adding duplicate user', () => {
userService.addUser(testUser);
expect(() => userService.addUser(testUser)).to.throw();
expect(() => userService.addUser(testUser)).to.throw(`User with id ${testUser.id} already exists`);

Choose a reason for hiding this comment

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

Codacy has a fix for the issue: Returning a void expression from an arrow function shorthand is forbidden. Please add braces to the arrow function.

Suggested change
expect(() => userService.addUser(testUser)).to.throw(`User with id ${testUser.id} already exists`);
expect(() => { userService.addUser(testUser); }).to.throw(`User with id ${testUser.id} already exists`);

});

it('should throw error when updating non-existent user', () => {
expect(() => userService.updateUser(testUser)).to.throw(`User with id ${testUser.id} not found`);

Choose a reason for hiding this comment

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

Codacy has a fix for the issue: Returning a void expression from an arrow function shorthand is forbidden. Please add braces to the arrow function.

Suggested change
expect(() => userService.updateUser(testUser)).to.throw(`User with id ${testUser.id} not found`);
expect(() => { userService.updateUser(testUser); }).to.throw(`User with id ${testUser.id} not found`);

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