Skip to content

Commit 45d7741

Browse files
committed
length as assertion => lengthOf
Related to chaijs/chai#684
1 parent c990a23 commit 45d7741

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

_guides/styles.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ var expect = require('chai').expect
6262

6363
expect(foo).to.be.a('string');
6464
expect(foo).to.equal('bar');
65-
expect(foo).to.have.length(3);
66-
expect(beverages).to.have.property('tea').with.length(3);
65+
expect(foo).to.have.lengthOf(3);
66+
expect(beverages).to.have.property('tea').with.lengthOf(3);
6767
```
6868

6969
Expect also allows you to include arbitrary messages to prepend to any failed
@@ -97,8 +97,8 @@ var should = require('chai').should() //actually call the function
9797

9898
foo.should.be.a('string');
9999
foo.should.equal('bar');
100-
foo.should.have.length(3);
101-
beverages.should.have.property('tea').with.length(3);
100+
foo.should.have.lengthOf(3);
101+
beverages.should.have.property('tea').with.lengthOf(3);
102102
```
103103

104104
### Differences

index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ <h3 class="fancy">Should</h2>
2222

2323
foo.should.be.a('string');
2424
foo.should.equal('bar');
25-
foo.should.have.length(3);
25+
foo.should.have.lengthOf(3);
2626
tea.should.have.property('flavors')
27-
.with.length(3);
27+
.with.lengthOf(3);
2828
{% endhighlight %}
2929
</div>
3030
<div class="more-wrap">
@@ -42,9 +42,9 @@ <h3 class="fancy">Expect</h2>
4242

4343
expect(foo).to.be.a('string');
4444
expect(foo).to.equal('bar');
45-
expect(foo).to.have.length(3);
45+
expect(foo).to.have.lengthOf(3);
4646
expect(tea).to.have.property('flavors')
47-
.with.length(3);
47+
.with.lengthOf(3);
4848
{% endhighlight %}
4949
</div>
5050
<div class="more-wrap">

0 commit comments

Comments
 (0)