summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@codeispoetry.ru>2017-03-16 19:49:01 +0000
committerAndrej Mihajlov <and@codeispoetry.ru>2017-03-16 19:49:01 +0000
commit70c2c54bc09243e16923c9fb68dbb8532ee5e63e (patch)
treec7cbecc80fa8d0b444eaab096c6accd3b1a84e32 /test
parentf1dfc4274c8e5495ccb9303058970d995e4f482a (diff)
downloadmullvadvpn-70c2c54bc09243e16923c9fb68dbb8532ee5e63e.tar.xz
mullvadvpn-70c2c54bc09243e16923c9fb68dbb8532ee5e63e.zip
Update tests to reflect new frame logic
Last played frame will remain instead of being reset to the first frame
Diffstat (limited to 'test')
-rw-r--r--test/tray-animator.spec.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/tray-animator.spec.js b/test/tray-animator.spec.js
index ed7b3bff7c..275215413d 100644
--- a/test/tray-animator.spec.js
+++ b/test/tray-animator.spec.js
@@ -8,7 +8,7 @@ describe('lib/tray-animator', function() {
let animation, animator;
beforeEach(() => {
- const images = (new Array(5)).map(() => nativeImage.createEmpty());
+ const images = [1, 2, 3, 4, 5].map(() => nativeImage.createEmpty());
animation = new TrayAnimation(images);
animation.speed = 1;
});
@@ -26,7 +26,7 @@ describe('lib/tray-animator', function() {
setImage: () => {
if(animation.isFinished) {
expect(seq).to.be.deep.equal([0, 1, 2, 3, 4]);
- expect(animation._currentFrame).to.be.equal(0);
+ expect(animation._currentFrame).to.be.equal(4);
done();
} else {
seq.push(animation._currentFrame);
@@ -45,7 +45,7 @@ describe('lib/tray-animator', function() {
setImage: () => {
if(animation.isFinished) {
expect(seq).to.be.deep.equal([4, 3, 2, 1, 0]);
- expect(animation._currentFrame).to.be.equal(4);
+ expect(animation._currentFrame).to.be.equal(0);
done();
} else {
seq.push(animation._currentFrame);