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/this-in-function-expressions/_config.js

11 lines
256 B

export default {
async test({ assert, component, target, window, raf }) {
const [_, btn] = target.querySelectorAll("button");
const clickEvent = new window.MouseEvent("click");
await btn.dispatchEvent(clickEvent);
assert.equal(btn.x, 1);
},
};