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

No more using length as it is going to be deprecated! #9

Closed

Conversation

clickthisnick
Copy link

No more .length because it will be deprecated!

@Turbo87
Copy link
Owner

Turbo87 commented Sep 15, 2016

@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);'
}],
Copy link
Owner

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?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea will do!

Copy link
Owner

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?

@clickthisnick
Copy link
Author

Here is the link to the deprecation:
http://chaijs.com/api/bdd/#method_length

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.

@keithamus
Copy link

keithamus commented Oct 12, 2016

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 length. See chaijs/chai#684 for more.

@Turbo87
Copy link
Owner

Turbo87 commented Oct 12, 2016

@keithamus thanks for the feedback!

@clickthisnick
Copy link
Author

Hey sorry, didn't know I had this outstanding. Going to close this pr, feel free to reopen.

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

Successfully merging this pull request may close these issues.

None yet

3 participants