diff options
| author | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2022-05-01 01:02:58 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <ruben@unlimited.pizza> | 2022-05-01 01:02:58 +0200 |
| commit | cac85db02ff00732cf75d473dc3411332f33d845 (patch) | |
| tree | 5f244968a905eb3888434b3f60cbf05d2b652207 /src/lib/stores/actions.test.ts | |
| parent | a7cf03c192470cbab13edeb1aec99e0c66dede10 (diff) | |
Apply formatting
Diffstat (limited to 'src/lib/stores/actions.test.ts')
| -rw-r--r-- | src/lib/stores/actions.test.ts | 45 |
1 files changed, 19 insertions, 26 deletions
diff --git a/src/lib/stores/actions.test.ts b/src/lib/stores/actions.test.ts index c650536..39e1f6e 100644 --- a/src/lib/stores/actions.test.ts +++ b/src/lib/stores/actions.test.ts @@ -1,32 +1,25 @@ import { enableTopicActions, disableTopicActions, topicActions } from './actions'; describe('Topic actions and state', () => { + test('There should be no topic actions by default', () => { + topicActions.subscribe((actions) => { + expect(actions).toBe(undefined); + })(); + }); - test('There should be no topic actions by default', () => { + test('enableTopicActions should set the topic id', () => { + enableTopicActions('free_hat'); + topicActions.subscribe((actions) => { + expect(actions).toEqual({ + id: 'free_hat' + }); + })(); + }); - topicActions.subscribe((actions) => { - - expect(actions).toBe(undefined); - })(); - }); - - test('enableTopicActions should set the topic id', () => { - - enableTopicActions('free_hat'); - topicActions.subscribe((actions) => { - - expect(actions).toEqual({ - id: 'free_hat' - }); - })(); - }); - - test('disableTopicActions should unset the topic id', () => { - - disableTopicActions(); - topicActions.subscribe((actions) => { - - expect(actions).toEqual(undefined); - })(); - }); + test('disableTopicActions should unset the topic id', () => { + disableTopicActions(); + topicActions.subscribe((actions) => { + expect(actions).toEqual(undefined); + })(); + }); }); |