Skip to content

Commit 4b67469

Browse files
committed
fix tests
1 parent 10ec911 commit 4b67469

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

test/runtime/samples/transition-js-if-outro-unrelated-component-binding-update/Component.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
let bool = true;
1212
</script>
1313

14-
<button on:click={() => (condition = false)} id="1" />
14+
<button on:click={() => (condition = false)} />
1515
<button on:click={() => (bool = !bool)} />
1616
{#if bool}
1717
<div out:foo />

test/runtime/samples/transition-js-if-outro-unrelated-component-binding-update/_config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
export default {
2-
test({ assert, target, window, raf }) {
3-
target.querySelector("button").click();
2+
async test({ assert, target, window, raf }) {
3+
const button = target.querySelector("button");
4+
const event = new window.MouseEvent("click");
5+
await button.dispatchEvent(event);
46
raf.tick(500);
57
assert.htmlEqual(target.innerHTML, "");
68
},

test/runtime/samples/transition-js-if-outro-unrelated-component-store-update/_config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export default {
2-
test({ assert, target, window, raf }) {
3-
target.querySelector("button").click();
2+
async test({ assert, target, component, raf }) {
3+
await component.condition.set(false);
44
raf.tick(500);
55
assert.htmlEqual(target.innerHTML, "");
66
},

test/runtime/samples/transition-js-if-outro-unrelated-component-store-update/main.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script>
22
import { writable } from "svelte/store";
33
import Component from "./Component.svelte";
4-
let condition = writable(true);
4+
export let condition = writable(true);
55
</script>
66

77
{#if $condition}

0 commit comments

Comments
 (0)