Skip to content

Commit 5c006ef

Browse files
author
daniel-lundin
committed
Fixed tests, removed Grunt and bower
1 parent 14463de commit 5c006ef

File tree

6 files changed

+8
-71
lines changed

6 files changed

+8
-71
lines changed

Gruntfile.js

Lines changed: 0 additions & 28 deletions
This file was deleted.

bower.json

Lines changed: 0 additions & 29 deletions
This file was deleted.

snabbt.min.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

src/animation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function createAnimation(startState, endState, options) {
3636

3737
// Public api
3838
return {
39-
options() { return options; },
39+
options: options,
4040
stop() { stopped = true; },
4141
endState() { return endState; },
4242
isStopped() { return stopped; },

src/engine.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ var Engine = {
7070

7171
// Call complete callback
7272
finished.forEach((animation) => {
73-
var completeCallback = animation[1].options().complete;
73+
var completeCallback = animation[1].options.complete;
7474
if (completeCallback)
7575
completeCallback();
7676
});
@@ -151,5 +151,4 @@ var Engine = {
151151
}
152152
};
153153

154-
window.Engine = Engine;
155154
module.exports = Engine;

src/tests/engineTests.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ describe('Engine', () => {
7575
describe('archiveCompletedAnimations', () => {
7676
it('should move finished animations from running to completed', () => {
7777
var animation = {
78+
options: {},
7879
completed() {
7980
return true;
8081
}
@@ -91,6 +92,7 @@ describe('Engine', () => {
9192

9293
it('should not save old finished animations on the same element', () => {
9394
var animation = {
95+
options: {},
9496
completed() {
9597
return true;
9698
}
@@ -112,15 +114,10 @@ describe('Engine', () => {
112114
chainer.snabbt({});
113115

114116
var animation = {
115-
completed() {
116-
return true;
117-
},
118-
endState() {
119-
return null;
120-
},
121-
getCurrentState() {
122-
return null;
123-
}
117+
options: {},
118+
completed() { return true; },
119+
endState() { return null; },
120+
getCurrentState() { return null; }
124121
};
125122
Engine.runningAnimations = [[{}, animation, chainer]];
126123

0 commit comments

Comments
 (0)