mirror of https://github.com/sveltejs/svelte
parent
d137ecafc3
commit
45ecae4ea0
@ -1,11 +1,16 @@
|
||||
import { flushSync } from 'svelte';
|
||||
import { test } from '../../test';
|
||||
import { async_mode } from '../../../helpers';
|
||||
|
||||
export default test({
|
||||
async test({ target, assert, logs }) {
|
||||
const button = target.querySelector('button');
|
||||
|
||||
flushSync(() => button?.click());
|
||||
assert.ok(logs[0].startsWith('set_context_after_init'));
|
||||
assert.ok(
|
||||
async_mode
|
||||
? logs[0].startsWith('set_context_after_init')
|
||||
: logs[0] === 'works without experimental async but really shouldnt'
|
||||
);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in new issue