Nov25 fixes (#1072)

* update deps
* fixes #963 and #1061
* fix the issue #974
* update test
This commit is contained in:
JFH
2025-11-27 14:10:49 -03:00
committed by GitHub
parent 16a0e0d945
commit babd3490c9
6 changed files with 60 additions and 9 deletions

View File

@@ -158,12 +158,15 @@ describe('Basic Module', function () {
const output = svgCanvas.getSvgString()
const hasXlink = output.includes('xmlns:xlink="http://www.w3.org/1999/xlink"')
const hasImageHref = /<image[^>]+href=/.test(output)
const hasSe = output.includes('xmlns:se=')
const hasFoo = output.includes('xmlns:foo=')
const hasAttr = output.includes('se:foo="bar"')
assert.equal(hasAttr, true, 'Preserved namespaced attribute on export')
assert.equal(hasXlink, true, 'Included xlink: xmlns')
assert.equal(hasImageHref, true, 'Preserved image href')
// xlink namespace is optional (href is preferred), accept either
assert.equal(hasXlink || hasImageHref, true, 'Included xlink namespace when needed')
assert.equal(hasSe, true, 'Included se: xmlns')
assert.equal(hasFoo, false, 'Did not include foo: xmlns')
})