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.
svelte/test/runtime/samples/binding-audio-currenttime/_config.js

17 lines
353 B

export default {
solo: true,
test ( assert, component, target, window ) {
assert.equal( component.get( 't' ), 0 );
const audio = target.querySelector( 'audio' );
const event = new window.Event( 'timeupdate' );
audio.currentTime = 10;
audio.dispatchEvent( event );
assert.equal( component.get( 't' ), 10 );
component.destroy();
}
};