summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-05-31 08:53:57 +0200
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-05-31 08:53:57 +0200
commit4a09d9ddb343fde1eb1c04279bef6a406bf6c1ac (patch)
treeb88714d2640ef6d5013da75497ba60b76d0e51ca /spec
parent414c79599d55eb505e5c596f5ccb281d2c482383 (diff)
downloadsvg.js-4a09d9ddb343fde1eb1c04279bef6a406bf6c1ac.tar.gz
svg.js-4a09d9ddb343fde1eb1c04279bef6a406bf6c1ac.zip
add failing test
Diffstat (limited to 'spec')
-rw-r--r--spec/spec/runner.js12
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 () {