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

Remove chai-as-promised #1116

Merged
merged 4 commits into from
Jul 26, 2018
Merged

Remove chai-as-promised #1116

merged 4 commits into from
Jul 26, 2018

Conversation

justuswilhelm
Copy link
Contributor

@justuswilhelm justuswilhelm commented Jul 25, 2018

Addresses #1091 -- it's about @nventuro's comment about removing chai-as-promised

🚀 Description

I'm doing a few things here:

  1. I enhanced expectThrow to test for one particular EVM message, e.g. invalid opcode
  2. I change all test cases to either just await and be done, or I use expectThrow and test for a specific exception message
  3. I remove chai-as-promised from package.json
  • 📘 I've reviewed the OpenZeppelin Contributor Guidelines
  • ✅ I've added tests where applicable to test my new functionality.
  • 📖 I've made sure that my contracts are well-documented.
  • 🎨 I've run the JS/Solidity linters and fixed any issues (npm run lint:all:fix).

Copy link
Contributor

@nventuro nventuro left a comment

Choose a reason for hiding this comment

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

This is awesome, thank you very much @justuswilhelm!

If you're into testing, there's a couple more easy issues that need love: two bugfixes (#775 and #938) and two features (#917 and #942). We plan on exporting our testing helpers soon for users of the library (#326), so these will be super helpful.

Thanks again!

'Expected \'' + message + '\', got \'' + error + '\' instead',
);
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you change this brace for an else, to emphasize the fact that the message parameter changes the usual behavior?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, absolutely. Let me fix that.

@justuswilhelm
Copy link
Contributor Author

Thanks for pointing out some other issues I can work on, @nventuro . And yes, I do enjoy working on test code! 👍

@nventuro
Copy link
Contributor

Great, thanks!

By the way, we do squash merges, so there's no need to rebase your branch when addressing reviews. Not doing that actually makes our job easier, since we can easily see what changed from review to review :)

@nventuro nventuro merged commit e6c15b3 into OpenZeppelin:master Jul 26, 2018
@justuswilhelm
Copy link
Contributor Author

@nventuro Much appreciated! Re. the squashing, noted!

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