fix test for wallet link in navbar to raise coverage

This commit is contained in:
Moriz Wahl 2023-02-20 14:59:24 +01:00
parent 9d60e414ad
commit 313e9c6e9f

View File

@ -68,14 +68,11 @@ describe('NavBar', () => {
}) })
describe('wallet', () => { describe('wallet', () => {
const windowLocationMock = jest.fn()
const windowLocation = window.location const windowLocation = window.location
beforeEach(async () => { beforeEach(async () => {
delete window.location delete window.location
window.location = { window.location = ''
assign: windowLocationMock, await wrapper.findAll('.nav-item').at(4).find('a').trigger('click')
}
await wrapper.findAll('.nav-item').at(5).find('a').trigger('click')
}) })
afterEach(() => { afterEach(() => {
@ -83,8 +80,8 @@ describe('NavBar', () => {
window.location = windowLocation window.location = windowLocation
}) })
it.skip('changes window location to wallet', () => { it('changes window location to wallet', () => {
expect(windowLocationMock()).toBe('valid-token') expect(window.location).toBe('http://localhost/authenticate?token=valid-token')
}) })
it('dispatches logout to store', () => { it('dispatches logout to store', () => {