mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 17:23:02 +00:00
26 lines
514 B
JavaScript
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;
|
|
});
|
|
});
|