From f7f6c4b801172ce119d4ea9a650c543670474784 Mon Sep 17 00:00:00 2001 From: Ulrich-Matthias Schäfer Date: Thu, 8 Nov 2018 14:14:05 +0100 Subject: `fill()` and `stroke()` return the fill and stroke attribute when called as getter (#789) --- spec/spec/sugar.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'spec') 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') }) }) -- cgit v1.2.3