From 0a857d505e69446fb1e841afaf3bb57ed23e5b63 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ulrich-Matthias=20Sch=C3=A4fer?= Date: Wed, 12 Oct 2016 14:48:28 +0200 Subject: [PATCH] fixed specs for SVG.Point, fixes #530 --- spec/SpecRunner.html | 1 + spec/spec/point.js | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) 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() { -- 2.39.5