-
Notifications
You must be signed in to change notification settings - Fork 5
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: unit tests for aggregate-report package #33
Conversation
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.
Thanks mate, and yes, it is an unit test, the most simpler one 😄
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.
I just reviewed and raised some points, take a look when you have time 🙂
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.
Let's try to stick to behavior-driven development use cases =)
test('Testing aggregate report function', () => { | ||
expect(aggregateReport(reportInfo)).toEqual(expectReport); | ||
}); | ||
}); |
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.
I think we should be strict into behavior-driven development here, you should be using it
instead of test
here, it would look a little bit like this:
describe('Aggregate Report', () => {
it('should return an object that matches the expected report', () => {
expect(aggregateReport(reportInfo)).toEqual(expectedReport);
});
});
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.
I get the ideia, I'll fix today, thanks.
btw, related to #32 |
perry-js#32 Improvement in the description and variable name to be more like behavior driven development
Tests for aggregateReport module
Initial test to validate aggregate report, I'm not sure if this is a unit test, so I'd like more opinions about this.