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/component-events-this/_config.js

12 lines
359 B

export default {
test({ assert, component, target, window }) {
const [button1, button2] = target.querySelectorAll('button');
button1.dispatchEvent(new window.MouseEvent('click'));
button2.dispatchEvent(new window.MouseEvent('click'));
assert.strictEqual(component.logs[0], button1);
assert.ok(component.logs[1] instanceof component.Inner);
}
};