-
Notifications
You must be signed in to change notification settings - Fork 13
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
No more using length as it is going to be deprecated! #9
Conversation
@clickthisnick do you have a link to this deprecation? is it deprecated already or will it be deprecated in the future? |
code: 'expect([1].length).to.be.equal(1);' | ||
}, { | ||
code: 'expect([1].length).to.equal(1);' | ||
}], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you make sure that stuff like expect('foo').to.have.length.above(2);
also still works without raising errors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea will do!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@clickthisnick are you still planning on working on this?
Here is the link to the deprecation: Deprecation notice: Using length as an assertion will be deprecated in version 2.4.0 and removed in 3.0.0. Code using the old style of asserting for length property value using length(value) should be switched to use lengthOf(value) instead. |
Just FYI, it's still available in chai 3.5.0 (I think) - but 4.0 (which will be released very very soon!) will most certainly remove |
@keithamus thanks for the feedback! |
Hey sorry, didn't know I had this outstanding. Going to close this pr, feel free to reopen. |
No more .length because it will be deprecated!