From ffa6eb223ee608056ac9cd24d122629d9ead9f94 Mon Sep 17 00:00:00 2001 From: Harry Faulkner Date: Sun, 21 Aug 2022 11:13:53 +0100 Subject: remove double quote from all 'url()' refs, update tests --- spec/spec/elements/ClipPath.js | 4 ++-- spec/spec/elements/Gradient.js | 2 +- spec/spec/elements/Mask.js | 4 ++-- spec/spec/elements/Pattern.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'spec') diff --git a/spec/spec/elements/ClipPath.js b/spec/spec/elements/ClipPath.js index d1d799b..1effe6d 100644 --- a/spec/spec/elements/ClipPath.js +++ b/spec/spec/elements/ClipPath.js @@ -70,7 +70,7 @@ describe('ClipPath.js', () => { it('sets the clip-path attribute on the element to the id of the clipPath', () => { const clip = new ClipPath().id('foo') const rect = new Rect().clipWith(clip) - expect(rect.attr('clip-path')).toBe('url("#foo")') + expect(rect.attr('clip-path')).toBe('url(#foo)') }) it('creates a clipPath and appends the passed element to it to clip current element', () => { @@ -78,7 +78,7 @@ describe('ClipPath.js', () => { const circle = canvas.circle(40) const rect = canvas.rect(100, 100).clipWith(circle) expect(circle.parent()).toEqual(any(ClipPath)) - expect(rect.attr('clip-path')).toBe(`url("#${circle.parent().id()}")`) + expect(rect.attr('clip-path')).toBe(`url(#${circle.parent().id()})`) }) }) diff --git a/spec/spec/elements/Gradient.js b/spec/spec/elements/Gradient.js index 2d3120a..76c36ce 100644 --- a/spec/spec/elements/Gradient.js +++ b/spec/spec/elements/Gradient.js @@ -77,7 +77,7 @@ describe('Gradient.js', () => { describe('url()', () => { it('returns url(#id)', () => { const gradient = new Gradient('linear').id('foo') - expect(gradient.url()).toBe('url("#foo")') + expect(gradient.url()).toBe('url(#foo)') }) }) diff --git a/spec/spec/elements/Mask.js b/spec/spec/elements/Mask.js index 913108a..32e5d15 100644 --- a/spec/spec/elements/Mask.js +++ b/spec/spec/elements/Mask.js @@ -71,7 +71,7 @@ describe('Mask.js', () => { it('sets the mask attribute on the element to the id of the maskPath', () => { const mask = new Mask().id('foo') const rect = new Rect().maskWith(mask) - expect(rect.attr('mask')).toBe('url("#foo")') + expect(rect.attr('mask')).toBe('url(#foo)') }) it('creates a maskPath and appends the passed element to it to mask current element', () => { @@ -79,7 +79,7 @@ describe('Mask.js', () => { const circle = canvas.circle(40) const rect = canvas.rect(100, 100).maskWith(circle) expect(circle.parent()).toEqual(any(Mask)) - expect(rect.attr('mask')).toBe(`url("#${circle.parent().id()}")`) + expect(rect.attr('mask')).toBe(`url(#${circle.parent().id()})`) }) }) diff --git a/spec/spec/elements/Pattern.js b/spec/spec/elements/Pattern.js index 9a4fcd5..670a1af 100644 --- a/spec/spec/elements/Pattern.js +++ b/spec/spec/elements/Pattern.js @@ -70,7 +70,7 @@ describe('Pattern.js', () => { describe('url()', () => { it('returns url(#id)', () => { const pattern = new Pattern().id('foo') - expect(pattern.url()).toBe('url("#foo")') + expect(pattern.url()).toBe('url(#foo)') }) }) -- cgit v1.2.3