diff options
author | wout <wout@impinc.co.uk> | 2014-09-03 15:39:47 +0200 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2014-09-03 15:39:47 +0200 |
commit | 2649e3153e82f840365ce26564be96e0385199ce (patch) | |
tree | 0b3657a2ada0887e9bb0945e4d703abbf63200eb /spec | |
parent | 17e15d57d8eb2cb20cc72abcf1bd5bb1bbd39e49 (diff) | |
download | svg.js-2649e3153e82f840365ce26564be96e0385199ce.tar.gz svg.js-2649e3153e82f840365ce26564be96e0385199ce.zip |
Fix in SVG.Number
Diffstat (limited to 'spec')
-rwxr-xr-x | spec/spec/number.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/spec/number.js b/spec/spec/number.js index 986338b..de00481 100755 --- a/spec/spec/number.js +++ b/spec/spec/number.js @@ -98,16 +98,17 @@ describe('Number', function() { beforeEach(function() { number = number.plus(4) }) - it('returns itself', function() { - expect(number.to('em')).toBe(number) + it('returns a new instance', function() { + expect(number.to('em')).not.toBe(number) + expect(number.to('em') instanceof SVG.Number).toBeTruthy() }) it('changes the unit value', function() { - number.to('%') + number = number.to('%') expect(number.unit).toBe('%') }) it('changes the output value', function() { var oldNumber = number.valueOf() - number.to('%') + number = number.to('%') expect(number.toString()).toBe('400%') }) }) |