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.
21 lines
382 B
21 lines
382 B
8 years ago
|
export default {
|
||
|
data: {
|
||
|
a: 42
|
||
|
},
|
||
|
|
||
|
test ( assert, component, target, window ) {
|
||
|
const input = target.querySelector( 'input' );
|
||
|
assert.equal( input.value, '42' );
|
||
|
|
||
|
const event = new window.Event( 'input' );
|
||
|
|
||
|
input.value = 43;
|
||
|
input.dispatchEvent( event );
|
||
|
|
||
|
assert.equal( input.value, '43' );
|
||
|
assert.equal( component.get( 'a' ), 43 );
|
||
|
|
||
|
component.destroy();
|
||
|
}
|
||
|
};
|