diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-05-31 08:53:57 +0200 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-05-31 08:53:57 +0200 |
commit | 4a09d9ddb343fde1eb1c04279bef6a406bf6c1ac (patch) | |
tree | b88714d2640ef6d5013da75497ba60b76d0e51ca /spec | |
parent | 414c79599d55eb505e5c596f5ccb281d2c482383 (diff) | |
download | svg.js-4a09d9ddb343fde1eb1c04279bef6a406bf6c1ac.tar.gz svg.js-4a09d9ddb343fde1eb1c04279bef6a406bf6c1ac.zip |
add failing test
Diffstat (limited to 'spec')
-rw-r--r-- | spec/spec/runner.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/spec/runner.js b/spec/spec/runner.js index 2e1007b..e90bb57 100644 --- a/spec/spec/runner.js +++ b/spec/spec/runner.js @@ -253,6 +253,18 @@ describe('SVG.Runner', function () { expect(initFn).toHaveBeenCalled() expect(runFn).toHaveBeenCalledWith(1) }) + + it('does behave correctly at the end of reversed loop', function () { + var spy = jasmine.createSpy('stepper') + var runner = new SVG.Runner(1000).loop(6, true) + runner.queue(null, spy) + + // the 6th loop is reversed + runner.step(5750) + expect(spy).toHaveBeenCalledWith(0.25) + runner.step(250) + expect(spy).toHaveBeenCalledWith(0) + }) }) describe('active()', function () { |