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

Merged
merged 1 commit into from May 10, 2015

Projects

None yet

2 participants

@valscion
Contributor

Fixes #427

@valscion valscion commented on an outdated diff Apr 16, 2015
@@ -1847,16 +1847,59 @@ module.exports = function (chai, _) {
Assertion.addMethod('haveOwnProperty', assertOwnProperty);
/**
- * ### .length(value)
+ * ### .ownPropertyDescriptor(name[, descriptor[, message]])
@valscion
valscion Apr 16, 2015 Contributor

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

@keithamus
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?

@keithamus keithamus commented on an outdated diff Apr 16, 2015
lib/chai/core/assertions.js
@@ -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
@keithamus
keithamus Apr 16, 2015 Member

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
Contributor

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
Contributor
valscion commented May 6, 2015

Hey @keithamus, is everything OK now?

@keithamus
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 keithamus merged commit eb31f3d into chaijs:master May 10, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment