Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
gromdimon committed Sep 27, 2023
1 parent 225b584 commit 3b60a70
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions frontend/src/views/__tests__/SvDetailView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@ const router = createRouter({
// Mock router push
router.push = vi.fn()



const makeWrapper = () => {
const pinia = createTestingPinia({ createSpy: vi.fn() })
const svInfoStore = useSvInfoStore(pinia)
const mockLoadData = vi.fn().mockImplementation(async (svTerm: string) => {
svInfoStore.storeState = StoreState.Active
svInfoStore.currentSvRecord = JSON.parse(JSON.stringify({'sv': svTerm}))
svInfoStore.currentSvRecord = JSON.parse(JSON.stringify({ sv: svTerm }))
})
svInfoStore.loadData = mockLoadData

// Initial load
svInfoStore.storeState = StoreState.Active
svInfoStore.currentSvRecord = JSON.parse(JSON.stringify({'searchTerm': 'DEL:chr17:41176312:41277500'}))
svInfoStore.currentSvRecord = JSON.parse(
JSON.stringify({ searchTerm: 'DEL:chr17:41176312:41277500' })
)
svInfoStore.genesInfos = JSON.parse(JSON.stringify([BRCA1GeneInfo]))

return mount(
Expand Down Expand Up @@ -80,16 +80,16 @@ describe.concurrent('SvDetailView', async () => {
callback()
}),
removeEventListener: vi.fn(),
scrollLeft: 0,
scrollLeft: 0
}
},
}
},
emits: ['row-click'],
template: '<div></div>'
}
}))
})

it('renders the header', async () => {
const wrapper = makeWrapper()
console.log(wrapper.html())
Expand All @@ -106,4 +106,4 @@ describe.concurrent('SvDetailView', async () => {
expect(aboutLink.exists()).toBe(true)
expect(contactLink.exists()).toBe(true)
})
})
})

0 comments on commit 3b60a70

Please sign in to comment.