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

Rename resolves and rejects assertions #187

Open
mantoni opened this issue Feb 26, 2020 · 1 comment
Open

Rename resolves and rejects assertions #187

mantoni opened this issue Feb 26, 2020 · 1 comment

Comments

@mantoni
Copy link
Member

mantoni commented Feb 26, 2020

The resolves and rejects assertions diverge from the naming convention use by Sinon assertions. In Sinon, resolves and rejects are used to program a stub or a fake, e.g. sinon.fake.resolves(42). The Sinon assertions to verify promises are sinon.assert.resolved(...) and sinon.assert.rejected(...).

I would therefore like to propose changing the names as follows:

  • resolves -> resolved
  • rejects -> rejected
  • toResolveWith -> toHaveBeenResolved
  • toRejectWith -> toHaveBeenRejected
@mroderick
Copy link
Member

@hexeberlin let's try to tackle this on Friday

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

No branches or pull requests

2 participants