mirror of https://github.com/sveltejs/svelte
parent
7a4934113f
commit
8402607a97
@ -0,0 +1,5 @@
|
||||
<svelte:head>
|
||||
<meta name="description" content="A"/>
|
||||
</svelte:head>
|
||||
|
||||
A
|
@ -0,0 +1,5 @@
|
||||
<svelte:head>
|
||||
<meta name="description" content="B"/>
|
||||
</svelte:head>
|
||||
|
||||
B
|
@ -0,0 +1,15 @@
|
||||
export default {
|
||||
html: `
|
||||
A
|
||||
`,
|
||||
|
||||
test({ assert, component, window }) {
|
||||
component.x = false;
|
||||
|
||||
const meta = window.document.querySelectorAll('meta');
|
||||
|
||||
assert.equal(meta.length, 1);
|
||||
assert.equal(meta[0].name, 'description');
|
||||
assert.equal(meta[0].content, 'B');
|
||||
}
|
||||
};
|
@ -0,0 +1,8 @@
|
||||
<script>
|
||||
import A from './A.svelte';
|
||||
import B from './B.svelte';
|
||||
|
||||
export let x = true;
|
||||
</script>
|
||||
|
||||
<svelte:component this="{x ? A : B}"/>
|
Loading…
Reference in new issue