Files
iD/test/spec/ui/flash.js
Tom MacWright d159b37ab6 Fix tests
2013-02-05 12:10:05 -05:00

26 lines
514 B
JavaScript

describe("iD.ui.flash", 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.ui.flash(elem);
clock.tick(1610);
expect(flash.node().parentNode).to.be.null;
});
});