mirror of https://github.com/sveltejs/svelte
Merge pull request #2683 from sveltejs/gh-2681
fix instrumentation of auto-subscription self-assignmentspull/2698/head
commit
117afe9a71
@ -0,0 +1,8 @@
|
|||||||
|
export default {
|
||||||
|
html: `[]`,
|
||||||
|
|
||||||
|
async test({ assert, component, target }) {
|
||||||
|
await component.go();
|
||||||
|
assert.htmlEqual(target.innerHTML, `[42]`);
|
||||||
|
}
|
||||||
|
};
|
@ -0,0 +1,11 @@
|
|||||||
|
<script>
|
||||||
|
import { writable } from 'svelte/store';
|
||||||
|
const foo = writable([]);
|
||||||
|
$: bar = $foo;
|
||||||
|
export function go() {
|
||||||
|
$foo.push(42);
|
||||||
|
$foo = $foo;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{JSON.stringify(bar)}
|
Loading…
Reference in new issue