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

When a spy or stub has not been called, the error should be grammatically correct #520

Closed
brian-mann opened this issue May 30, 2017 · 2 comments
Assignees
Milestone

Comments

@brian-mann
Copy link
Member

  • Cypress Version: 0.19.2

Are you requesting a feature or reporting a bug?

Bug

Current behavior:

With this test code:

it "stubs", ->
  obj = {
    foo: ->
  }

  cy.stub(obj, "foo")

  expect(obj.foo).to.be.calledWith("bar")

We get this error message:

screen shot 2017-05-30 at 6 00 23 pm

Expected behavior:

The error should say:

Expected foo to have been called with arguments "bar".

foo was never called.
@chrisbreiding
Copy link
Contributor

The code for this is done, but this has yet to be released. We'll update the issue and reference the changelog when it's released.

@brian-mann
Copy link
Member Author

Fixed in 0.20.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants