|
|
|
|
@ -1,10 +1,8 @@
|
|
|
|
|
import { tick } from 'svelte';
|
|
|
|
|
import { test } from '../../test';
|
|
|
|
|
import { normalise_trace_logs } from '../../../helpers.js';
|
|
|
|
|
|
|
|
|
|
export default test({
|
|
|
|
|
// TODO reinstate
|
|
|
|
|
skip: true,
|
|
|
|
|
|
|
|
|
|
compileOptions: {
|
|
|
|
|
dev: true
|
|
|
|
|
},
|
|
|
|
|
@ -15,13 +13,16 @@ export default test({
|
|
|
|
|
await tick();
|
|
|
|
|
assert.htmlEqual(target.innerHTML, '<button>a</button><button>b</button><h1>3</h1>');
|
|
|
|
|
|
|
|
|
|
assert.equal(
|
|
|
|
|
warnings[0],
|
|
|
|
|
'Detected reactivity loss when reading `values[1]`. This happens when state is read in an async function after an earlier `await`'
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
assert.equal(warnings[1].name, 'traced at');
|
|
|
|
|
|
|
|
|
|
assert.equal(warnings.length, 2);
|
|
|
|
|
assert.deepEqual(normalise_trace_logs(warnings), [
|
|
|
|
|
{
|
|
|
|
|
log: 'Detected reactivity loss when reading `values.length`. This happens when state is read in an async function after an earlier `await`'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
log: 'Detected reactivity loss when reading `values[1]`. This happens when state is read in an async function after an earlier `await`'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
log: 'Detected reactivity loss when reading `values.length`. This happens when state is read in an async function after an earlier `await`'
|
|
|
|
|
}
|
|
|
|
|
]);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|