You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/svg-each-block-namespace/_config.js

15 lines
491 B

export default {
html: `
<svg>
<circle cx='0' cy='100' r='100' fill='red'/><circle cx='100' cy='100' r='100' fill='green'/><circle cx='200' cy='100' r='100' fill='blue'/>
</svg>
`,
test({ assert, target }) {
const circles = target.querySelectorAll('circle');
assert.equal(circles[0].namespaceURI, 'http://www.w3.org/2000/svg');
assert.equal(circles[1].namespaceURI, 'http://www.w3.org/2000/svg');
assert.equal(circles[2].namespaceURI, 'http://www.w3.org/2000/svg');
}
};