Skip to content

Commit

Permalink
feat(jest): 100% coverage for store/ui/getters
Browse files Browse the repository at this point in the history
  • Loading branch information
drepram committed Apr 22, 2022
1 parent 57cfd69 commit 9f5dc16
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions store/ui/__snapshots__/getters.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`init should return the isLoadingFileIndex property of the initial state 1`] = `false`;

exports[`init should return the showSidebar property of the initial state 1`] = `true`;

exports[`init should return the swiperSlideIndex property of the initial state 1`] = `0`;
Expand Down
6 changes: 6 additions & 0 deletions store/ui/getters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ describe('init', () => {
inst = getters.default
})

it('should return the isLoadingFileIndex property of the initial state', () => {
const result: any = inst.getFilesIndexLoading(InitialUIState())
expect(result).toBeFalsy()
expect(result).toMatchSnapshot()
})

it('should return the showSidebar property of the initial state', () => {
const result: any = inst.showSidebar(InitialUIState())
expect(result).toBeTruthy()
Expand Down

0 comments on commit 9f5dc16

Please sign in to comment.