From 85100c410b4b8a17319470572bf495244193d1d2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ulrich-Matthias=20Sch=C3=A4fer?= Date: Mon, 27 Mar 2017 13:29:24 +0200 Subject: [PATCH] relax test --- spec/spec/circle.js | 8 -------- spec/spec/group.js | 2 -- spec/spec/helper.js | 2 +- spec/spec/image.js | 17 ----------------- spec/spec/path.js | 4 ++-- 5 files changed, 3 insertions(+), 30 deletions(-) diff --git a/spec/spec/circle.js b/spec/spec/circle.js index 3595ba0..fc66e0c 100644 --- a/spec/spec/circle.js +++ b/spec/spec/circle.js @@ -175,11 +175,3 @@ describe('Circle', function() { }) }) - - - - - - - - diff --git a/spec/spec/group.js b/spec/spec/group.js index 63335ae..4d5ff36 100644 --- a/spec/spec/group.js +++ b/spec/spec/group.js @@ -113,6 +113,4 @@ describe('Group', function() { expect(group.node.getAttribute('transform')).toBe('matrix(1,0,0,1,130,85)') }) }) - - }) diff --git a/spec/spec/helper.js b/spec/spec/helper.js index 576b9b6..fb0e50d 100644 --- a/spec/spec/helper.js +++ b/spec/spec/helper.js @@ -2,7 +2,7 @@ //var drawing, window = window, document = document, SVG = SVG if(typeof exports === 'object'){ - window = require('svgdom') + window = require('../../../svgdom/dom.js') SVG = require('../../dist/svg.js') document = window.document drawing = document.documentElement diff --git a/spec/spec/image.js b/spec/spec/image.js index c7ffd22..4b51a9b 100644 --- a/spec/spec/image.js +++ b/spec/spec/image.js @@ -224,20 +224,3 @@ describe('Image', function() { }) }) - - - - - - - - - - - - - - - - - diff --git a/spec/spec/path.js b/spec/spec/path.js index cfa416a..f5b99ca 100644 --- a/spec/spec/path.js +++ b/spec/spec/path.js @@ -155,14 +155,14 @@ describe('Path', function() { it('defines the width and height proportionally with only the width value given', function() { var box = path.bbox() path.size(500) - expect(path.width()).toBe(500) + expect(path.width()).toBeCloseTo(500) expect(path.width() / path.height()).toBe(box.width / box.height) }) it('defines the width and height proportionally with only the height value given', function() { var box = path.bbox() path.size(null, 525) expect(path.height()).toBe(525) - expect(path.width() / path.height()).toBe(box.width / box.height) + expect(path.width() / path.height()).toBeCloseTo(box.width / box.height) }) }) -- 2.39.5