|
|
@ -1,5 +1,5 @@
|
|
|
|
import * as assert from 'assert';
|
|
|
|
import * as assert from 'assert';
|
|
|
|
import { readable, writable, derive } from '../../store.js';
|
|
|
|
import { readable, writable, derive, get } from '../../store.js';
|
|
|
|
|
|
|
|
|
|
|
|
describe('store', () => {
|
|
|
|
describe('store', () => {
|
|
|
|
describe('writable', () => {
|
|
|
|
describe('writable', () => {
|
|
|
@ -172,4 +172,11 @@ describe('store', () => {
|
|
|
|
unsubscribe();
|
|
|
|
unsubscribe();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
describe('get', () => {
|
|
|
|
|
|
|
|
it('gets the current value of a store', () => {
|
|
|
|
|
|
|
|
const store = readable(() => {}, 42);
|
|
|
|
|
|
|
|
assert.equal(get(store), 42);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|