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.
29 lines
766 B
29 lines
766 B
8 years ago
|
export default {
|
||
|
html: `<div>undefinedxundefined</div>`,
|
||
|
|
||
8 years ago
|
skip: /^v4/.test( process.version ), // node 4 apparently does some dumb stuff
|
||
8 years ago
|
'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
|
||
|
|
||
8 years ago
|
test ( assert, component, target, window ) {
|
||
|
const event = new window.Event( 'resize' );
|
||
|
|
||
|
// JSDOM executes window event listeners with `global` rather than
|
||
|
// `window` (bug?) so we need to do this
|
||
|
Object.defineProperties( global, {
|
||
|
innerWidth: {
|
||
|
value: 567,
|
||
|
configurable: true
|
||
|
},
|
||
|
innerHeight: {
|
||
|
value: 456,
|
||
|
configurable: true
|
||
|
}
|
||
|
});
|
||
|
|
||
|
window.dispatchEvent( event );
|
||
|
|
||
|
assert.htmlEqual( target.innerHTML, `
|
||
|
<div>567x456</div>
|
||
|
`);
|
||
|
}
|
||
|
};
|