mirror of https://github.com/sveltejs/svelte
failing test for #569
parent
2faf78804d
commit
c0b7156318
@ -0,0 +1,3 @@
|
||||
{{#if true}}
|
||||
<span>Component</span>
|
||||
{{/if}}
|
@ -0,0 +1,20 @@
|
||||
export default {
|
||||
data: {
|
||||
flag: true
|
||||
},
|
||||
|
||||
html: `
|
||||
<span>Before</span>
|
||||
<span>Component</span>
|
||||
<span>After</span>
|
||||
`,
|
||||
|
||||
test ( assert, component, target ) {
|
||||
component.set( { flag: false } );
|
||||
assert.htmlEqual( target.innerHTML, `
|
||||
<span>Before</span>
|
||||
<span>Component</span>
|
||||
<span>After</span>
|
||||
`);
|
||||
}
|
||||
};
|
@ -0,0 +1,14 @@
|
||||
<span>Before</span>
|
||||
{{#if flag}}
|
||||
<Component/>
|
||||
{{else}}
|
||||
<Component/>
|
||||
{{/if}}
|
||||
<span>After</span>
|
||||
|
||||
<script>
|
||||
import Component from './Component.html';
|
||||
export default {
|
||||
components: { Component }
|
||||
};
|
||||
</script>
|
Loading…
Reference in new issue