mirror of https://github.com/sveltejs/svelte
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.
24 lines
668 B
24 lines
668 B
8 years ago
|
export default {
|
||
|
data: {
|
||
|
foo: true
|
||
|
},
|
||
|
|
||
|
html: `true`,
|
||
|
|
||
|
skip: /^v4/.test( process.version ), // node 4 apparently does some dumb stuff
|
||
|
'skip-ssr': true, // there's some kind of weird bug with this test... it compiles with the wrong require.extensions hook for some bizarre reason
|
||
|
|
||
|
test ( assert, component, target, window ) {
|
||
|
const event = new window.Event( 'click' );
|
||
|
|
||
|
window.dispatchEvent( event );
|
||
|
assert.equal( component.get( 'foo' ), false );
|
||
|
assert.htmlEqual( target.innerHTML, `false` );
|
||
|
|
||
|
window.dispatchEvent( event );
|
||
|
assert.equal( component.get( 'foo' ), true );
|
||
|
assert.htmlEqual( target.innerHTML, `true` );
|
||
|
|
||
|
component.destroy();
|
||
|
}
|
||
|
};
|