mirror of https://github.com/sveltejs/svelte
fix extracting names from ThisExpression (#5036)
parent
1644f207b1
commit
6e2b81663c
@ -0,0 +1,10 @@
|
|||||||
|
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);
|
||||||
|
},
|
||||||
|
};
|
@ -0,0 +1,2 @@
|
|||||||
|
<button on:click="{() => { this.x = 1; }}" />
|
||||||
|
<button on:click="{function () { this.x = 1; }}" />
|
Loading…
Reference in new issue