mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
test watch function for visible
This commit is contained in:
parent
b7a1b2da69
commit
2cf7de2e4b
@ -1,4 +1,4 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import { mount, shallowMount } from '@vue/test-utils'
|
||||
import Navbar from './Navbar'
|
||||
|
||||
const localVue = global.localVue
|
||||
@ -81,4 +81,23 @@ describe('Navbar', () => {
|
||||
})
|
||||
})
|
||||
})
|
||||
describe('check watch visible true', () => {
|
||||
beforeEach(async () => {
|
||||
await wrapper.setProps({ visible: true })
|
||||
})
|
||||
|
||||
it('has visibleCollapse == visible', async () => {
|
||||
expect(wrapper.vm.visibleCollapse).toBe(true)
|
||||
})
|
||||
})
|
||||
|
||||
describe('check watch visible false', () => {
|
||||
beforeEach(async () => {
|
||||
await wrapper.setProps({ visible: false })
|
||||
})
|
||||
|
||||
it('has visibleCollapse == visible', async () => {
|
||||
expect(wrapper.vm.visibleCollapse).toBe(false)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user