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-legacy/samples/action-update-before-destroy/_config.js

18 lines
338 B

import { flushSync } from 'svelte';
import { test } from '../../test';
export default test({
html: `
<button>Click Me</button>
<div>1</div>
`,
async test({ assert, target, logs }) {
const button = target.querySelector('button');
button?.click();
flushSync();
assert.deepEqual(logs, ['afterUpdate', 'onDestroy']);
}
});