funkwhale/front/tests/unit/specs/components/common.spec.js

19 lines
449 B
JavaScript

import { describe, it, expect } from 'vitest'
import { mount } from '@vue/test-utils'
import Username from '@/components/common/Username.vue'
import { render } from '../../utils'
describe('Username', () => {
it('displays username', () => {
const wrapper = mount(Username, {
propsData: {
username: 'Hello'
}
})
const vm = render(Username, {username: 'Hello'})
expect(wrapper.text()).to.equal('Hello')
})
})