From 75eab77126cf8a2c7ab31263ac061dabbaf9f1b4 Mon Sep 17 00:00:00 2001 From: Andre Christoga Pramaditya Date: Mon, 28 Mar 2022 23:25:11 +0700 Subject: [PATCH] feat(jest): 81% coverage for store/ui/mutations --- store/ui/mutations.test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/store/ui/mutations.test.ts b/store/ui/mutations.test.ts index 707da1b574..ba61ecb0a5 100644 --- a/store/ui/mutations.test.ts +++ b/store/ui/mutations.test.ts @@ -3149,6 +3149,7 @@ describe('mutations', () => { value: '#2761fd', }, }, + isLoadingFileIndex: true, } test('togglePinned', () => { @@ -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')