Skip to content

Commit

Permalink
feat(jest): 81% coverage for store/ui/mutations (#2532)
Browse files Browse the repository at this point in the history
  • Loading branch information
drepram authored Mar 28, 2022
1 parent afba75d commit 4fe1d7d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions store/ui/mutations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3149,6 +3149,7 @@ describe('mutations', () => {
value: '#2761fd',
},
},
isLoadingFileIndex: true,
}

test('togglePinned', () => {
Expand Down Expand Up @@ -3711,6 +3712,16 @@ describe('mutations', () => {
mutations.default.setChatbarFocus(localizedState, true)
expect(localizedState.chatbarFocus).toBeTruthy()
})
test('setIsLoadingFileIndex', () => {
const localizedState = { ...initialState }
mutations.default.setIsLoadingFileIndex(localizedState, false)
expect(localizedState.isLoadingFileIndex).toBeFalsy()
})
test('setRenameItem', () => {
const localizedState = { ...initialState }
mutations.default.setRenameItem(localizedState, 'new name')
expect(localizedState.renameCurrentName).toBe('new name')
})
test('setSettingsRoute', () => {
const localizedState = { ...initialState }
mutations.default.setSettingsRoute(localizedState, 'profile')
Expand Down

0 comments on commit 4fe1d7d

Please sign in to comment.