mirror of https://github.com/sveltejs/svelte
commit
478e462741
@ -1,3 +1,3 @@
|
||||
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 {
|
||||
html: '<button>toggle</button>\n\n<!--#if visible-->',
|
||||
html: '<button>toggle</button>\n\n<!---->',
|
||||
test ( assert, component, target, window ) {
|
||||
const button = target.querySelector( 'button' );
|
||||
const event = new window.MouseEvent( 'click' );
|
||||
|
||||
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 );
|
||||
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