Skip to content

Commit

Permalink
feat(jest): 81% coverage for store/ui/mutations
Browse files Browse the repository at this point in the history
  • Loading branch information
drepram committed Mar 28, 2022
1 parent afba75d commit 75eab77
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 75eab77

Please sign in to comment.