I am currently experimenting with this code:
describe("array item removal", function () {
it("creates a gap in the array", function () {
var array = ['one','two','three'];
delete array[1]; //'two' removed
expect(array).toEqual(['one',undefined,'three']);
});
});
Despite my expectations, this test case fails. I wonder why that is happening? Shouldn't it be equal?