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: unit tests for aggregate-report package #33

Merged
merged 3 commits into from
Sep 28, 2018

Conversation

iagocavalcante
Copy link
Contributor

Initial test to validate aggregate report, I'm not sure if this is a unit test, so I'd like more opinions about this.

Copy link
Member

@armand1m armand1m left a 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 😄

package.json Show resolved Hide resolved
Copy link
Member

@armand1m armand1m left a 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 🙂

Copy link
Member

@armand1m armand1m left a 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);
});
});
Copy link
Member

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);
  });
});

Copy link
Contributor Author

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.

@armand1m
Copy link
Member

btw, related to #32

perry-js#32 Improvement in the description and variable name to be more like behavior driven development
package.json Show resolved Hide resolved
@armand1m armand1m merged commit 9999820 into perry-js:master Sep 28, 2018
@armand1m armand1m changed the title Tests Test: unit tests for aggregate-report package Sep 28, 2018
guilhermelimak pushed a commit to guilhermelimak/perry that referenced this pull request Oct 21, 2018
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