mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
37 lines
730 B
JavaScript
37 lines
730 B
JavaScript
import { mount } from '@vue/test-utils'
|
|
import UserCard from './UserCard'
|
|
|
|
const localVue = global.localVue
|
|
|
|
describe('UserCard', () => {
|
|
let wrapper
|
|
|
|
const mocks = {
|
|
$t: jest.fn((t) => t),
|
|
$n: jest.fn((n) => String(n)),
|
|
$store: {
|
|
state: {
|
|
email: 'user@example.org',
|
|
},
|
|
},
|
|
}
|
|
|
|
const Wrapper = () => {
|
|
return mount(UserCard, { localVue, mocks })
|
|
}
|
|
|
|
describe('mount', () => {
|
|
beforeEach(() => {
|
|
wrapper = Wrapper()
|
|
})
|
|
|
|
it('renders the Div Element ".userdata-card"', () => {
|
|
expect(wrapper.find('div.userdata-card').exists()).toBeTruthy()
|
|
})
|
|
|
|
it('renders the Div Element "vue-qrcode"', () => {
|
|
expect(wrapper.find('vue-qrcode'))
|
|
})
|
|
})
|
|
})
|