test fix for CommunityMember.vue

This commit is contained in:
ogerly 2022-12-23 09:26:55 +01:00
parent 8adb7d9b54
commit 544509446a
2 changed files with 33 additions and 1 deletions

View File

@ -0,0 +1,32 @@
import { mount } from '@vue/test-utils'
import CommunityMember from './CommunityMember'
const localVue = global.localVue
const mocks = {
$i18n: {
locale: 'en',
},
$t: jest.fn((t) => t),
}
const propsData = {
totalUsers: 123,
}
describe('CommunityMember', () => {
let wrapper
const Wrapper = () => {
return mount(CommunityMember, { localVue, mocks, propsData })
}
describe('mount', () => {
beforeEach(() => {
wrapper = Wrapper()
})
it('renders the component transaction-slot-send', () => {
expect(wrapper.find('div.community-member').exists()).toBe(true)
})
})
})

View File

@ -1,5 +1,5 @@
<template>
<div>
<div class="community-member">
<div class="text-center">
<b-badge class="position-absolute mt--2 ml--5 px-3" variant="success">
{{ $t('member') }}