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

Update Cypress to use Chai 4.0 instead of 3.5 #1153

Closed
jennifer-shehane opened this issue Jan 5, 2018 · 4 comments
Closed

Update Cypress to use Chai 4.0 instead of 3.5 #1153

jennifer-shehane opened this issue Jan 5, 2018 · 4 comments
Labels
type: feature New feature that does not currently exist

Comments

@jennifer-shehane
Copy link
Member

jennifer-shehane commented Jan 5, 2018

  • Cypress Version: 1.4.1

Is this a Feature or Bug?

Feature

Current behavior:

There have been some new methods that were introduced to Chai between 3.5 & 4.0, but Cypress still uses 3.5. Current version of Chai 4.1.2 and have some more bug fixes and ES6 fixes.

Desired behavior:

Ability to use updates in Chai 4.0:

  • Add ordered assertion: to.have.ordered.members
  • Throw when non-existent property is read. expect(true).to.be.ture; // Oops, typo, now Chai will throw an Error
  • Have suggestions on typos. expect(false).to.be.fals; // Error: Invalid Chai property: fals. Did you mean "false"?
  • Use by with increase, change decrease. expect(increaseByTwo).to.increase(obj, 'val').by(2)
  • Use does and but as new no-op assertion.
  • Use nested property

How to reproduce:

Test Code

expect([1, 2]).to.have.ordered.members([1, 2])

Resulting Error

CypressError: Timed out retrying: Cannot read property 'members' of undefined
@bahmutov bahmutov added the type: feature New feature that does not currently exist label Jan 5, 2018
@lilaconlee
Copy link
Contributor

Covered by #2529

@swatisharma0303
Copy link

swatisharma0303 commented Jul 10, 2019

Hi @jennifer-shehane , I am using [email protected] and still getting the same error
image

@jennifer-shehane
Copy link
Member Author

@Swati-activeops The code for this is done in #2862, but this has yet to be released. We'll update this issue and reference the changelog when it's released.

Sorry for the confusion.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Feb 6, 2020

Released in 4.0.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v4.0.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Feb 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature New feature that does not currently exist
Projects
None yet
Development

No branches or pull requests

4 participants