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

Add .length(value) deprecation warning to documentation #429

Merged

Conversation

valscion
Copy link
Contributor

Fixes #427

@@ -1847,16 +1847,59 @@ module.exports = function (chai, _) {
Assertion.addMethod('haveOwnProperty', assertOwnProperty);

/**
* ### .length(value)
* ### .ownPropertyDescriptor(name[, descriptor[, message]])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The built source seems to create a funky diff — I haven't touched the ownPropertyDescriptor matcher at all.

@keithamus
Copy link
Member

Sorry @valscion - I should have mentioned you don't need to update chai.js - it will be updated as part of the release cycle. Could you pretty please remove it from the commit?

@@ -956,8 +950,25 @@ module.exports = function (chai, _) {
* expect('foo').to.have.length.within(2,4);
* expect([ 1, 2, 3 ]).to.have.length.within(2,4);
*
* *Deprecatin notice:* Using `length` as an assertion will be deprecated
* in version 2.2.1 and removed in 2.3. Code using the old style of
Copy link
Member

Choose a reason for hiding this comment

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

Next release will be 2.3.0, and we'll have to remove it in 3.0.0 to keep semver. So could you please change this message to:

   * *Deprecation notice:* Using `length` as an assertion will be deprecated
   * in version 2.3.0 and removed in 3.0.0. Code using the old style of

(Also you had a typo in Depricatin(sic))

@valscion valscion force-pushed the document-deprecation-plan-of-length branch from 21cf438 to 2330d93 Compare April 17, 2015 13:55
@valscion
Copy link
Contributor Author

Sorry @valscion - I should have mentioned you don't need to update chai.js - it will be updated as part of the release cycle.

Ah, it wasn't so clear based on CONTRIBUTING.md so I figured I'd rather do it first and then ask later whether it was ok or not 😄

As for the deprecation notice text, I changed them to what you suggested.

@valscion
Copy link
Contributor Author

valscion commented May 6, 2015

Hey @keithamus, is everything OK now?

@keithamus
Copy link
Member

Sorry @valscion this one slipped by me. Version is a number out now, but I'll fix that as it's my bad. All looks good, thanks for your hard work 😄.

keithamus added a commit that referenced this pull request May 10, 2015
…ngth

Add .length(value) deprecation warning to documentation
@keithamus keithamus merged commit eb31f3d into chaijs:master May 10, 2015
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.

Length() should be removed from documentation
2 participants