Observe the following tests:
describe("Testing i", function(){
var i = 0;
it('i should be 0', function() {
expect(i).to.equal(0);
});
i++;
it('i should be 1', function() {
expect(i).to.equal(1);
});
i= 7;
it('i should be 7', function() {
expect(i).to.equal(7);
});
});
The first two tests fail. But I have no idea why! What am I doing wrong?
The test shows the following:
Aucun commentaire:
Enregistrer un commentaire