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/dynamic-element-pass-props/_config.js

17 lines
332 B

let clicked = false;
export default {
props: {
tag: 'div',
onClick: () => clicked = true
},
html: '<div style="display: inline;">Foo</div>',
async test({ assert, target, window }) {
const div = target.querySelector('div');
await div.dispatchEvent(new window.MouseEvent('click'));
assert.equal(clicked, true);
}
};