test: readable without updater

pull/6293/head
Ignatius Bagus 5 years ago
parent 2392701833
commit 2b491284fd
No known key found for this signature in database
GPG Key ID: 357C6674A45CC06B

@ -140,6 +140,19 @@ describe('store', () => {
assert.deepEqual(values, [undefined]); assert.deepEqual(values, [undefined]);
}); });
it('creates a readable store without updater', () => {
const store = readable(100);
const values = [];
const unsubscribe = store.subscribe(value => {
values.push(value);
});
unsubscribe();
assert.deepEqual(values, [100]);
});
}); });
const fake_observable = { const fake_observable = {

Loading…
Cancel
Save