diff options
-rw-r--r-- | spec/spec/fx.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/spec/fx.js b/spec/spec/fx.js index bde3c23..abc49fd 100644 --- a/spec/spec/fx.js +++ b/spec/spec/fx.js @@ -1605,6 +1605,18 @@ describe('FX', function() { expect(fx.pos).toBe(1) // It should end not reversed, which mean the position is expected to be 1 // ((9-1)-6) is even, the -1 is because we do not want reversed to be toggled after the last loop }) + + it('should not throw an error when stop is called in a during callback', function () { + fx.move(100,100).start() + fx.during(function () {this.stop()}) + expect(fx.step.bind(fx)).not.toThrow() + }) + + it('should not throw an error when finish is called in a during callback', function () { + fx.move(100,100).start() + fx.during(function () {this.finish()}) + expect(fx.step.bind(fx)).not.toThrow() + }) }) }) |