From c12e7d6389159835ab0d42062d7a9a244fcda6fe Mon Sep 17 00:00:00 2001 From: Richard Harris Date: Sun, 8 Sep 2019 18:35:34 -0400 Subject: [PATCH] invalidate store values in + +

count: {$count}

\ No newline at end of file diff --git a/test/runtime/samples/store-unreferenced/_config.js b/test/runtime/samples/store-unreferenced/_config.js new file mode 100644 index 0000000000..0695edf8dc --- /dev/null +++ b/test/runtime/samples/store-unreferenced/_config.js @@ -0,0 +1,13 @@ +import { count } from './store.js'; + +export default { + html: `

count: 0

`, + + async test({ assert, component, target }) { + await component.increment(); + + assert.htmlEqual(target.innerHTML, `

count: 1

`); + + count.set(0); + } +}; diff --git a/test/runtime/samples/store-unreferenced/main.svelte b/test/runtime/samples/store-unreferenced/main.svelte new file mode 100644 index 0000000000..f55a5bdbdf --- /dev/null +++ b/test/runtime/samples/store-unreferenced/main.svelte @@ -0,0 +1,10 @@ + + + \ No newline at end of file diff --git a/test/runtime/samples/store-unreferenced/store.js b/test/runtime/samples/store-unreferenced/store.js new file mode 100644 index 0000000000..99e27e5584 --- /dev/null +++ b/test/runtime/samples/store-unreferenced/store.js @@ -0,0 +1,3 @@ +import { writable } from '../../../../store'; + +export const count = writable(0); \ No newline at end of file