fix:Add missing test #2826 & fix related solution
This commit is contained in:
parent
1dc6dfbc7c
commit
82e5d13b89
2 changed files with 9 additions and 0 deletions
|
@ -11,5 +11,6 @@ let ladder = {
|
|||
},
|
||||
showStep: function() {
|
||||
alert(this.step);
|
||||
return this;
|
||||
}
|
||||
};
|
|
@ -32,6 +32,14 @@ describe('Ladder', function() {
|
|||
it('down().up().up().up() ', function() {
|
||||
assert.equal(ladder.down().up().up().up().step, 2);
|
||||
});
|
||||
|
||||
it('showStep() should return this', function() {
|
||||
assert.equal(ladder.showStep(), ladder);
|
||||
});
|
||||
|
||||
it('up().up().down().showStep().down().showStep()', function () {
|
||||
assert.equal(ladder.up().up().down().showStep().down().showStep().step, 0)
|
||||
});
|
||||
|
||||
after(function() {
|
||||
ladder.step = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue