mirror of https://github.com/sveltejs/svelte
parent
1afcfd2b5f
commit
e1a7831711
@ -0,0 +1,13 @@
|
|||||||
|
import { writable } from 'svelte/store';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
html: '31',
|
||||||
|
async test({ assert, component, target, window }) {
|
||||||
|
component.store = undefined;
|
||||||
|
|
||||||
|
assert.htmlEqual(target.innerHTML, 'undefined');
|
||||||
|
|
||||||
|
component.store = writable(42);
|
||||||
|
assert.htmlEqual(target.innerHTML, '42');
|
||||||
|
}
|
||||||
|
};
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
<script>
|
||||||
|
import { writable } from 'svelte/store';
|
||||||
|
export let store = writable(31);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{$store}
|
||||||
Loading…
Reference in new issue