mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
remove warnings from test
This commit is contained in:
parent
3e894d36bd
commit
0b60759c69
@ -68,13 +68,23 @@ describe('NavBar', () => {
|
||||
})
|
||||
|
||||
describe('wallet', () => {
|
||||
const assignLocationSpy = jest.fn()
|
||||
const windowLocationMock = jest.fn()
|
||||
const windowLocation = window.location
|
||||
beforeEach(async () => {
|
||||
delete window.location
|
||||
window.location = {
|
||||
assign: windowLocationMock,
|
||||
}
|
||||
await wrapper.findAll('.nav-item').at(5).find('a').trigger('click')
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
delete window.location
|
||||
window.location = windowLocation
|
||||
})
|
||||
|
||||
it.skip('changes window location to wallet', () => {
|
||||
expect(assignLocationSpy).toBeCalledWith('valid-token')
|
||||
expect(windowLocationMock()).toBe('valid-token')
|
||||
})
|
||||
|
||||
it('dispatches logout to store', () => {
|
||||
@ -84,6 +94,7 @@ describe('NavBar', () => {
|
||||
|
||||
describe('logout', () => {
|
||||
const windowLocationMock = jest.fn()
|
||||
const windowLocation = window.location
|
||||
beforeEach(async () => {
|
||||
delete window.location
|
||||
window.location = {
|
||||
@ -92,6 +103,11 @@ describe('NavBar', () => {
|
||||
await wrapper.findAll('.nav-item').at(5).find('a').trigger('click')
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
delete window.location
|
||||
window.location = windowLocation
|
||||
})
|
||||
|
||||
it('redirects to /logout', () => {
|
||||
expect(windowLocationMock).toBeCalledWith('http://localhost/login')
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user