Skip to content

Commit

Permalink
simplify test
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderhahn committed May 15, 2019
1 parent 52eda23 commit e45aa0f
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions test/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,17 +248,11 @@ describe('store', () => {
const b = writable(1);
const c = derived([a, b], ([a, b]) => `${a} ${b}`);

const values: string[] = [];

const unsubscribe = c.subscribe(value => {
values.push(value);
});
assert.deepEqual(get(c), 'one 1');

a.set('two');
b.set(2);
assert.deepEqual(values, 'two 2');

unsubscribe();
assert.deepEqual(get(c), 'two 2');
});
});

Expand Down

0 comments on commit e45aa0f

Please sign in to comment.