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/attribute-casing/_config.js

24 lines
577 B

export default {
html: `
<div class='SHOUTY'>YELL</div>
<svg viewBox='0 0 100 100' id='one'>
<text textLength=100>hellooooo</text>
</svg>
<svg viewBox='0 0 100 100' id='two'>
<text textLength=100>hellooooo</text>
</svg>
`,
6 years ago
test({ assert, target }) {
const attr = sel => target.querySelector(sel).attributes[0].name;
assert.equal(attr('div'), 'class');
assert.equal(attr('svg#one'), 'viewBox');
assert.equal(attr('svg#one text'), 'textLength');
assert.equal(attr('svg#two'), 'viewBox');
assert.equal(attr('svg#two text'), 'textLength');
}
};