Files
iD/test/spec/ui/flash.js
2016-10-04 21:56:09 -04:00

26 lines
512 B
JavaScript

describe('iD.uiFlash', function () {
var clock;
var elem;
beforeEach(function() {
elem = d3.select('body').append('div');
});
afterEach(function() { elem.remove(); });
beforeEach(function () {
clock = sinon.useFakeTimers();
});
afterEach(function () {
clock.restore();
});
it('leaves after 1000 ms', function () {
var flash = iD.uiFlash(elem);
clock.tick(1610);
expect(flash.node().parentNode).to.be.null;
});
});