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/packages/svelte/tests/runtime-runes/samples/async-each-sibling/_config.js

17 lines
422 B

import { tick } from 'svelte';
import { test } from '../../test';
export default test({
mode: ['async-server', 'hydrate', 'client'],
ssrHtml: `<ul><li>1</li></ul> <button>add</button>`,
async test({ assert, target }) {
await tick();
const [add] = target.querySelectorAll('button');
add.click();
await tick();
assert.htmlEqual(target.innerHTML, `<ul><li>1</li><li>2</li></ul> <button>add</button>`);
}
});