aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2014-01-31 19:01:16 +0100
committerwout <wout@impinc.co.uk>2014-01-31 19:01:16 +0100
commit859bbecc67cbb0d81cf8639c4cfefbf39151faef (patch)
tree3fd18fbcad4a7a480e1a2b14b7cabe5d4aa8c8ef /spec
parenta7288d90d3eb6529f635259d48084f407f81ca36 (diff)
downloadsvg.js-859bbecc67cbb0d81cf8639c4cfefbf39151faef.tar.gz
svg.js-859bbecc67cbb0d81cf8639c4cfefbf39151faef.zip
Fix in color morphing
Diffstat (limited to 'spec')
-rw-r--r--spec/spec/color.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/spec/color.js b/spec/spec/color.js
index 526b544..eec3f48 100644
--- a/spec/spec/color.js
+++ b/spec/spec/color.js
@@ -60,6 +60,14 @@ describe('Color', function() {
expect(morphed.g).toBe(51)
expect(morphed.b).toBe(127)
})
+
+ it('morphes color to 1 with higher values', function() {
+ var destination = new SVG.Color('#fff')
+ var morphed = color.morph(destination).at(2)
+ expect(morphed.r).toBe(255)
+ expect(morphed.g).toBe(255)
+ expect(morphed.b).toBe(255)
+ })
})
})