Merge pull request #2837 from Omid-Heidarzadeh/bugfix-2826-add-missing-tests

fix:Add missing test issue:#2826 & fix related solution
This commit is contained in:
Ilya Kantor 2022-01-22 22:29:30 +03:00 committed by GitHub
commit 025f588571
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -11,5 +11,6 @@ let ladder = {
},
showStep: function() {
alert(this.step);
return this;
}
};

View file

@ -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;