diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2020-05-09 14:50:09 +1000 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2020-05-09 14:51:04 +1000 |
commit | e541557d0a7ca53b0ad2fa343ee91203d1811248 (patch) | |
tree | c8312505c7323dc5544793594d5a9a6597edc728 /spec | |
parent | 36689d5e7272db5ce982ff52b4c8772564b13004 (diff) | |
download | svg.js-e541557d0a7ca53b0ad2fa343ee91203d1811248.tar.gz svg.js-e541557d0a7ca53b0ad2fa343ee91203d1811248.zip |
close tags in tests so that svgdom is satisfied
Diffstat (limited to 'spec')
-rw-r--r-- | spec/spec/elements/Dom.js | 2 | ||||
-rw-r--r-- | spec/spec/modules/core/circled.js | 2 | ||||
-rw-r--r-- | spec/spec/modules/core/selector.js | 8 | ||||
-rw-r--r-- | 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('<rect /><circle>', undefined, svg)).toBe(canvas) + expect(canvas.xml('<rect /><circle />', 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('<div>', true).id('foo').addTo(container) - const span = SVG('<span>', true).addClass('bar').addTo(div) - const span2 = SVG('<span>', true).addTo(div) + const div = SVG('<div />', true).id('foo').addTo(container) + const span = SVG('<span />', true).addClass('bar').addTo(div) + const span2 = SVG('<span />', 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('<div>', true).id('foo').addTo(container) + const div = SVG('<div />', 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('<div>', true) + const div = makeInstance('<div />', true) expect(adoptSpy).toHaveBeenCalledWith(any(Node)) expect(adoptSpy).toHaveBeenCalledWith(objectContaining({ nodeName: 'DIV', namespaceURI: 'http://www.w3.org/1999/xhtml' })) |