Skip to content

Remove chai-as-promised#1116

Merged
nventuro merged 4 commits into
OpenZeppelin:masterfrom
justuswilhelm:master
Jul 26, 2018
Merged

Remove chai-as-promised#1116
nventuro merged 4 commits into
OpenZeppelin:masterfrom
justuswilhelm:master

Conversation

@justuswilhelm

@justuswilhelm justuswilhelm commented Jul 25, 2018

Copy link
Copy Markdown
Contributor

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).

@nventuro nventuro left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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