aboutsummaryrefslogtreecommitdiffstats
path: root/spec/helpers.js
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2020-04-25 15:20:44 +1000
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2020-04-25 15:20:44 +1000
commitb8427b841323fe2c8dc14584b0b10c30159d2023 (patch)
treed20167149a5b5ef294e70e618584f8ca38c8decd /spec/helpers.js
parente058f51bf16cd908a266391f7d657f35e501bb17 (diff)
downloadsvg.js-b8427b841323fe2c8dc14584b0b10c30159d2023.tar.gz
svg.js-b8427b841323fe2c8dc14584b0b10c30159d2023.zip
sort out unused regex, add parser and regex tests, fix textable tests
Diffstat (limited to 'spec/helpers.js')
-rw-r--r--spec/helpers.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/helpers.js b/spec/helpers.js
index 0fa2a1f..d6d1405 100644
--- a/spec/helpers.js
+++ b/spec/helpers.js
@@ -1,9 +1,9 @@
import { getWindow } from '../src/utils/window.js'
-import { ns } from '../src/modules/core/namespaces.js'
+import { svg } from '../src/modules/core/namespaces.js'
function tag (name, attrs, children) {
const doc = getWindow().document
- const el = doc.createElementNS(ns, name)
+ const el = doc.createElementNS(svg, name)
let i
for (i in attrs) {
@@ -158,4 +158,6 @@ export function clear () {
// remove if present
fixtures && fixtures.parentNode.removeChild(fixtures)
canvas.parentNode.removeChild(canvas)
+
+ ;[ ...doc.querySelectorAll('svg') ].forEach((el) => el.parentNode.removeChild(el))
}