Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

64 implement a unit test for the resource component #66

Merged

Conversation

sgobotta
Copy link
Member

@sgobotta sgobotta commented Jan 18, 2019

This PR provides:

  • Factory utils for unit testing
  • Unit test for the Resource component (positive case only)

Depends on #65

const crud = {}
resources.forEach(resource => {
crud[`${resource}/byId`] = (id) => id,
crud[`${resource}/isError`] = () => false,
Copy link
Member

Choose a reason for hiding this comment

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

It's perfect! But the arrow functions are unnecessary to return values without receive params

Copy link
Member Author

Choose a reason for hiding this comment

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

Alright, thanks :) I'm taking on to open a cleanup issue in the future!

@estefi-prieto estefi-prieto merged commit c623018 into develop Jan 28, 2019
@sgobotta sgobotta deleted the 64-implement-a-unit-test-for-the-Resource-component branch January 30, 2019 13:16
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants