|
|
@ -12,6 +12,13 @@ export default test({
|
|
|
|
await tick();
|
|
|
|
await tick();
|
|
|
|
assert.htmlEqual(target.innerHTML, '<button>a</button><button>b</button><h1>3</h1>');
|
|
|
|
assert.htmlEqual(target.innerHTML, '<button>a</button><button>b</button><h1>3</h1>');
|
|
|
|
|
|
|
|
|
|
|
|
assert.deepEqual(warnings, ['Detected reactivity loss']);
|
|
|
|
assert.equal(
|
|
|
|
|
|
|
|
warnings[0],
|
|
|
|
|
|
|
|
'Detected reactivity loss when reading `b`. This happens when state is read in an async function after an earlier `await`'
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assert.equal(warnings[1].name, 'TracedAtError');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assert.equal(warnings.length, 2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|