From e541557d0a7ca53b0ad2fa343ee91203d1811248 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ulrich-Matthias=20Sch=C3=A4fer?= Date: Sat, 9 May 2020 14:50:09 +1000 Subject: [PATCH] close tags in tests so that svgdom is satisfied --- spec/spec/elements/Dom.js | 2 +- spec/spec/modules/core/circled.js | 2 +- spec/spec/modules/core/selector.js | 8 ++++---- spec/spec/utils/adopter.js | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/spec/spec/elements/Dom.js b/spec/spec/elements/Dom.js index bcf0ed5..2e36c92 100644 --- a/spec/spec/elements/Dom.js +++ b/spec/spec/elements/Dom.js @@ -656,7 +656,7 @@ describe('Dom.js', function () { it('works without a parent', () => { const canvas = new Svg() - expect(canvas.xml('', undefined, svg)).toBe(canvas) + expect(canvas.xml('', undefined, svg)).toBe(canvas) }) }) diff --git a/spec/spec/modules/core/circled.js b/spec/spec/modules/core/circled.js index f74332a..ae01f0c 100644 --- a/spec/spec/modules/core/circled.js +++ b/spec/spec/modules/core/circled.js @@ -8,7 +8,7 @@ describe('circled.js', () => { let element beforeEach(() => { - element = new Ellipse(50, 50) + element = new Ellipse().move(50, 50) }) describe('rx()', () => { diff --git a/spec/spec/modules/core/selector.js b/spec/spec/modules/core/selector.js index 7a17466..1336059 100644 --- a/spec/spec/modules/core/selector.js +++ b/spec/spec/modules/core/selector.js @@ -6,9 +6,9 @@ import { getWindow } from '../../../../src/utils/window.js' describe('selector.js', () => { describe('baseFind()', () => { it('finds all elements of a selector in the document', () => { - const div = SVG('
', true).id('foo').addTo(container) - const span = SVG('', true).addClass('bar').addTo(div) - const span2 = SVG('', true).addTo(div) + const div = SVG('
', true).id('foo').addTo(container) + const span = SVG('', true).addClass('bar').addTo(div) + const span2 = SVG('', true).addTo(div) expect(find('#canvas').map(el => el.node)).toEqual([ container ]) expect(find('span')).toEqual([ span, span2 ]) @@ -17,7 +17,7 @@ describe('selector.js', () => { }) it('finds all elements of a selector scoped to an element', () => { - const div = SVG('
', true).id('foo').addTo(container) + const div = SVG('
', true).id('foo').addTo(container) expect(find('#canvas', getWindow().document)[0].node).toBe(container) expect(find('#foo', container)).toEqual([ div ]) diff --git a/spec/spec/utils/adopter.js b/spec/spec/utils/adopter.js index 5ed6713..60c1642 100644 --- a/spec/spec/utils/adopter.js +++ b/spec/spec/utils/adopter.js @@ -75,7 +75,7 @@ describe('adopter.js', () => { }) it('creates an element in the html namespace from passed html string', () => { - const div = makeInstance('
', true) + const div = makeInstance('
', true) expect(adoptSpy).toHaveBeenCalledWith(any(Node)) expect(adoptSpy).toHaveBeenCalledWith(objectContaining({ nodeName: 'DIV', namespaceURI: 'http://www.w3.org/1999/xhtml' })) -- 2.39.5