diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-08 14:14:05 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-08 14:14:05 +0100 |
commit | f7f6c4b801172ce119d4ea9a650c543670474784 (patch) | |
tree | 7b4c2426101d30cd67c2e5c38ed5cee40bfdf55c /spec | |
parent | d3baefd3d4fac81ba27459197f289bff1a846046 (diff) | |
download | svg.js-f7f6c4b801172ce119d4ea9a650c543670474784.tar.gz svg.js-f7f6c4b801172ce119d4ea9a650c543670474784.zip |
`fill()` and `stroke()` return the fill and stroke attribute when called as getter (#789)
Diffstat (limited to 'spec')
-rw-r--r-- | spec/spec/sugar.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/spec/sugar.js b/spec/spec/sugar.js index 5ec6049..f79d7d5 100644 --- a/spec/spec/sugar.js +++ b/spec/spec/sugar.js @@ -34,10 +34,9 @@ describe('Sugar', function() { expect(rect.attr('fill-rule')).toBe('odd') }) - it('is a nop with no argument given and returns node reference', function() { + it('returns fill color when called as getter', function() { rect.fill('red') - expect(rect.fill()).toBe(rect) - expect(rect.attr('fill')).toBe('red') + expect(rect.fill()).toBe('red') }) }) |