diff --git a/test/animate-notification-test.html b/test/animate-notification-test.html
index 00e76a2..8fc1c5b 100644
--- a/test/animate-notification-test.html
+++ b/test/animate-notification-test.html
@@ -74,8 +74,10 @@
it('should remove card after animation', done => {
notifications[1]._card.addEventListener('animationend', () => {
- expect(notifications[1]._card.parentNode).not.to.be.ok;
- done();
+ flush(() => {
+ expect(notifications[1]._card.parentNode).not.to.be.ok;
+ done();
+ });
});
});
@@ -90,17 +92,21 @@
expect(notifications[0]._card.hasAttribute('closing')).to.be.false;
expect(notifications[1]._card.hasAttribute('closing')).to.be.true;
notifications[1]._card.addEventListener('animationend', () => {
- expect(notifications[0]._card.hasAttribute('closing')).to.be.false;
- expect(notifications[1]._card.hasAttribute('closing')).to.be.false;
- done();
+ flush(() => {
+ expect(notifications[0]._card.hasAttribute('closing')).to.be.false;
+ expect(notifications[1]._card.hasAttribute('closing')).to.be.false;
+ done();
+ });
});
});
it('should set `opening` attribute and remove later', done => {
expect(notifications[1]._card.hasAttribute('opening')).to.be.true;
notifications[1]._card.addEventListener('animationend', () => {
- expect(notifications[1]._card.hasAttribute('opening')).to.be.false;
- done();
+ flush(() => {
+ expect(notifications[1]._card.hasAttribute('opening')).to.be.false;
+ done();
+ });
});
});
});