Skip to content

Commit 4b6b822

Browse files
committed
♻️ Add and improve tests (#1845)
1 parent d583a46 commit 4b6b822

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/test/lib/stores/active_contest_type.svelte.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,16 @@ describe('ActiveContestTypeStore', () => {
1414
expect(store.get()).toBe('abcLatest20Rounds');
1515
});
1616

17+
test('expects to initialize with provided value', () => {
18+
const customStore = new ActiveContestTypeStore('abc319Onwards' as ContestTableProviders);
19+
expect(customStore.get()).toBe('abc319Onwards');
20+
});
21+
1722
test('expects to return the current value when calling get()', () => {
1823
expect(store.get()).toBe('abcLatest20Rounds');
1924

2025
// Change the value and verify get() returns the new value
21-
store.value = 'abc319Onwards' as ContestTableProviders;
26+
store.set('abc319Onwards' as ContestTableProviders);
2227
expect(store.get()).toBe('abc319Onwards');
2328
});
2429

0 commit comments

Comments
 (0)