Sha256: 9033c1c4a15cf46bae23f1eb46f62d9b3734d39359a6fd2ccaaa11d4da336875
Contents?: true
Size: 900 Bytes
Versions: 6
Compression:
Stored size: 900 Bytes
Contents
describe('PosAnimation', function () { var el; beforeEach(function () { el = document.createElement('div'); this.subject = new L.PosAnimation(); this.subject._el = el; }); describe('#_onStep', function () { it("sets element position and fires step event if it is able to get current position", function () { var point = new L.Point(5, 5, true); sinon.stub(this.subject, '_getPos').returns(point); this.subject.fire = sinon.stub(); this.subject._onStep(); expect(this.subject.fire.withArgs('step').calledOnce).to.be(true); expect(L.DomUtil.getPosition(this.subject._el)).to.be(point); }); it('stops transition if a position returned', function () { sinon.stub(this.subject, '_onTransitionEnd'); sinon.stub(this.subject, '_getPos').returns(undefined); this.subject._onStep(); expect(this.subject._onTransitionEnd.calledOnce).to.be(true); }); }); });
Version data entries
6 entries across 6 versions & 1 rubygems