mirror of https://github.com/sveltejs/svelte
parent
47f0ae5773
commit
b7510b016d
@ -0,0 +1,16 @@
|
||||
import { tick } from 'svelte';
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
skip_mode: ['server'],
|
||||
|
||||
ssrHtml: '<p>yep</p>',
|
||||
|
||||
async test({ assert, target, variant }) {
|
||||
if (variant === 'dom') {
|
||||
await tick();
|
||||
}
|
||||
|
||||
assert.htmlEqual(target.innerHTML, '<p>yep</p>');
|
||||
}
|
||||
});
|
||||
@ -0,0 +1,10 @@
|
||||
<script>
|
||||
await 0;
|
||||
const condition = await true;
|
||||
</script>
|
||||
|
||||
{#if condition}
|
||||
<p>yep</p>
|
||||
{:else}
|
||||
<p>nope</p>
|
||||
{/if}
|
||||
Loading…
Reference in new issue