mirror of https://github.com/sveltejs/svelte
parent
cdb4a3568d
commit
2316d7d348
@ -1,3 +1,3 @@
|
|||||||
export default {
|
export default {
|
||||||
html: `<p>a</p><p>b</p><p>c</p><!--#each [ 'a', 'b', 'c' ]-->`
|
html: `<p>a</p><p>b</p><p>c</p><!---->`
|
||||||
};
|
};
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
export default {
|
export default {
|
||||||
html: '<button>toggle</button>\n\n<!--#if visible-->',
|
html: '<button>toggle</button>\n\n<!---->',
|
||||||
test ( assert, component, target, window ) {
|
test ( assert, component, target, window ) {
|
||||||
const button = target.querySelector( 'button' );
|
const button = target.querySelector( 'button' );
|
||||||
const event = new window.MouseEvent( 'click' );
|
const event = new window.MouseEvent( 'click' );
|
||||||
|
|
||||||
button.dispatchEvent( event );
|
button.dispatchEvent( event );
|
||||||
assert.equal( target.innerHTML, '<button>toggle</button>\n\n<p>hello!</p><!--#if visible-->' );
|
assert.equal( target.innerHTML, '<button>toggle</button>\n\n<p>hello!</p><!---->' );
|
||||||
|
|
||||||
button.dispatchEvent( event );
|
button.dispatchEvent( event );
|
||||||
assert.equal( target.innerHTML, '<button>toggle</button>\n\n<!--#if visible-->' );
|
assert.equal( target.innerHTML, '<button>toggle</button>\n\n<!---->' );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in new issue