File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -62,8 +62,8 @@ var expect = require('chai').expect
62
62
63
63
expect (foo).to .be .a (' string' );
64
64
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 );
67
67
```
68
68
69
69
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
97
97
98
98
foo .should .be .a (' string' );
99
99
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 );
102
102
```
103
103
104
104
### Differences
Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ <h3 class="fancy">Should</h2>
22
22
23
23
foo.should.be.a('string');
24
24
foo.should.equal('bar');
25
- foo.should.have.length (3);
25
+ foo.should.have.lengthOf (3);
26
26
tea.should.have.property('flavors')
27
- .with.length (3);
27
+ .with.lengthOf (3);
28
28
{% endhighlight %}
29
29
</ div >
30
30
< div class ="more-wrap ">
@@ -42,9 +42,9 @@ <h3 class="fancy">Expect</h2>
42
42
43
43
expect(foo).to.be.a('string');
44
44
expect(foo).to.equal('bar');
45
- expect(foo).to.have.length (3);
45
+ expect(foo).to.have.lengthOf (3);
46
46
expect(tea).to.have.property('flavors')
47
- .with.length (3);
47
+ .with.lengthOf (3);
48
48
{% endhighlight %}
49
49
</ div >
50
50
< div class ="more-wrap ">
You can’t perform that action at this time.
0 commit comments