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-foreign-na.../_config.js

25 lines
726 B

// Test support for the `foreign` namespace preserving attribute case,
// including ensuring that SVG elements don't interfere.
export default {
html: `
<page horizontalAlignment="center">
<button textWrap="true" text="button"></button>
<text wordWrap="true"></text>
</page>
`,
options: {
hydrate: false // Hydration test will fail as case sensitivity is only handled for svg elements.
},
skip_if_hydrate_from_ssr: true,
compileOptions: {
namespace: 'foreign'
},
test({ assert, target }) {
const attr = sel => target.querySelector(sel).attributes[0].name;
assert.equal(attr('page'), 'horizontalAlignment');
assert.equal(attr('button'), 'textWrap');
assert.equal(attr('text'), 'wordWrap');
}
};