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

Can we fail the test if the assertion property is invalid? #36

Closed
bahmutov opened this issue Oct 3, 2022 · 1 comment
Closed

Can we fail the test if the assertion property is invalid? #36

bahmutov opened this issue Oct 3, 2022 · 1 comment
Labels
bug Something isn't working released

Comments

@bahmutov
Copy link
Owner

bahmutov commented Oct 3, 2022

A test like this one

describe('aliases', () => {
  it('has an existing alias', () => {
    cy.wrap(42).as('answer')
    cy.get('@answer').if('exists').log('alias exists').should('equal', 42)
  })
})

Quietly fails with the error in the DevTools console "Invalid Chai property: exists. Did you mean "exist"?"

Screen Shot 2022-10-03 at 13 46 51

@bahmutov bahmutov added the bug Something isn't working label Oct 3, 2022
@github-actions
Copy link

github-actions bot commented Oct 3, 2022

🎉 This issue has been resolved in version 1.8.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

No branches or pull requests

1 participant