From: Ulrich-Matthias Schäfer Date: Wed, 12 Oct 2016 12:48:28 +0000 (+0200) Subject: fixed specs for SVG.Point, fixes #530 X-Git-Tag: 2.3.5~6 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0a857d505e69446fb1e841afaf3bb57ed23e5b63;p=svg.js.git fixed specs for SVG.Point, fixes #530 --- diff --git a/spec/SpecRunner.html b/spec/SpecRunner.html index 4f204a6..192aef1 100644 --- a/spec/SpecRunner.html +++ b/spec/SpecRunner.html @@ -58,6 +58,7 @@ + diff --git a/spec/spec/point.js b/spec/spec/point.js index ce28781..3cd0bdc 100644 --- a/spec/spec/point.js +++ b/spec/spec/point.js @@ -5,8 +5,8 @@ describe('Point', function() { describe('without a source', function() { - point(function() { - matrix = new SVG.Point + beforeEach(function() { + point = new SVG.Point }) it('creates a new point with default values', function() { @@ -76,7 +76,7 @@ describe('Point', function() { describe('morph()', function() { it('stores a given point for morphing', function() { var point1 = new SVG.Point(1,1) - , point2 = new SVG.Matrix(2,2) + , point2 = new SVG.Point(2,2) point1.morph(point2) @@ -84,7 +84,7 @@ describe('Point', function() { }) it('stores a clone, not the given matrix itself', function() { var point1 = new SVG.Point(1,1) - , point2 = new SVG.Matrix(2,2) + , point2 = new SVG.Point(2,2) point1.morph(point2) @@ -96,9 +96,9 @@ describe('Point', function() { it('returns a morphed point at a given position', function() { var point1 = new SVG.Point(1,1) , point2 = new SVG.Point(2,2) - , matrix3 = matrix1.morph(matrix2).at(0.5) + , point3 = point1.morph(point2).at(0.5) - expect(matrix3).toEqual(new SVG.Point(1.5, 1.5)) + expect(point3).toEqual(new SVG.Point(1.5, 1.5)) }) }) @@ -107,9 +107,9 @@ describe('Point', function() { var point = new SVG.Point(1,5) , matrix = new SVG.Matrix(0,0,1,0,0,1) - expect(point.transform(matrox)).toEqual(new SVG.Point(5,1)) + expect(point.transform(matrix)).toEqual(new SVG.Point(5,1)) }) - } + }) describe('native()', function() { it('returns native SVGPoint', function() {