From 62309d38c49ca134ea9e69fa9043e091ee53c340 Mon Sep 17 00:00:00 2001 From: Lucas Vieira Date: Sun, 1 May 2016 13:16:54 -0300 Subject: [PATCH] Documentation update to indicate type requirements --- lib/chai/core/assertions.js | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/lib/chai/core/assertions.js b/lib/chai/core/assertions.js index 5050d62e1..ab6a9f648 100644 --- a/lib/chai/core/assertions.js +++ b/lib/chai/core/assertions.js @@ -622,14 +622,15 @@ module.exports = function (chai, _) { /** * ### .above(value) * - * Asserts that the target is greater than `value`. + * Asserts that the number target is greater than `value`. * * expect(10).to.be.above(5); * * Can also be used in conjunction with `length` to * assert a minimum length. The benefit being a * more informative error message than if the length - * was supplied directly. + * was supplied directly. In this case the target must + * have a length property. * * expect('foo').to.have.length.above(2); * expect([ 1, 2, 3 ]).to.have.length.above(2); @@ -683,14 +684,15 @@ module.exports = function (chai, _) { /** * ### .least(value) * - * Asserts that the target is greater than or equal to `value`. + * Asserts that the number target is greater than or equal to `value`. * * expect(10).to.be.at.least(10); * * Can also be used in conjunction with `length` to * assert a minimum length. The benefit being a * more informative error message than if the length - * was supplied directly. + * was supplied directly. In this case the target must + * have a length property. * * expect('foo').to.have.length.of.at.least(2); * expect([ 1, 2, 3 ]).to.have.length.of.at.least(3); @@ -742,14 +744,15 @@ module.exports = function (chai, _) { /** * ### .below(value) * - * Asserts that the target is less than `value`. + * Asserts that the number target is less than `value`. * * expect(5).to.be.below(10); * * Can also be used in conjunction with `length` to * assert a maximum length. The benefit being a * more informative error message than if the length - * was supplied directly. + * was supplied directly. In this case the target must + * have a length property. * * expect('foo').to.have.length.below(4); * expect([ 1, 2, 3 ]).to.have.length.below(4); @@ -803,14 +806,15 @@ module.exports = function (chai, _) { /** * ### .most(value) * - * Asserts that the target is less than or equal to `value`. + * Asserts that the number target is less than or equal to `value`. * * expect(5).to.be.at.most(5); * * Can also be used in conjunction with `length` to * assert a maximum length. The benefit being a * more informative error message than if the length - * was supplied directly. + * was supplied directly. In this case the target must + * have a length property. * * expect('foo').to.have.length.of.at.most(4); * expect([ 1, 2, 3 ]).to.have.length.of.at.most(3); @@ -862,14 +866,15 @@ module.exports = function (chai, _) { /** * ### .within(start, finish) * - * Asserts that the target is within a range. + * Asserts that the number target is within a range of numbers. * * expect(7).to.be.within(5,10); * * Can also be used in conjunction with `length` to * assert a length range. The benefit being a * more informative error message than if the length - * was supplied directly. + * was supplied directly. In this case the target must + * have a length property. * * expect('foo').to.have.length.within(2,4); * expect([ 1, 2, 3 ]).to.have.length.within(2,4);