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/target-shadow-dom/_config.js

14 lines
373 B

export default {
skip_if_ssr: true,
compileOptions: {
cssHash: () => 'svelte-xyz'
},
async test({ assert, component, target, window }) {
assert.htmlEqual(window.document.head.innerHTML, '');
assert.htmlEqual(component.div.shadowRoot.innerHTML, `
<style id="svelte-xyz">div.svelte-xyz{color:red}</style>
<div class="svelte-xyz">Hello World</div>
`);
}
};