summaryrefslogtreecommitdiffstats
path: root/tests/javascript/unit/store/item.spec.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/javascript/unit/store/item.spec.ts')
-rw-r--r--tests/javascript/unit/store/item.spec.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/javascript/unit/store/item.spec.ts b/tests/javascript/unit/store/item.spec.ts
index b0c5fa412..f194ad223 100644
--- a/tests/javascript/unit/store/item.spec.ts
+++ b/tests/javascript/unit/store/item.spec.ts
@@ -129,6 +129,16 @@ describe('item.ts', () => {
expect(state.selectedId).toEqual(123)
})
})
+
+ describe('SET_PLAYING_ITEM', () => {
+ it('should update selectedId on state', async () => {
+ const state = { playingItem: undefined } as any
+ const item = { id: 123 } as any
+ mutations[FEED_ITEM_MUTATION_TYPES.SET_PLAYING_ITEM](state, item as any)
+ expect(state.playingItem).toEqual(item)
+ })
+ })
+
describe('SET_ITEMS', () => {
it('should add feeds to state', () => {
const state = { allItems: [] as any } as any