mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
37 lines
673 B
JavaScript
Executable File
37 lines
673 B
JavaScript
Executable File
import { shallowMount } from '@vue/test-utils'
|
|
|
|
import Component from './CtaUnblockAuthor.vue'
|
|
|
|
const localVue = global.localVue
|
|
|
|
describe('CtaUnblockAuthor.vue', () => {
|
|
let propsData, wrapper, mocks
|
|
|
|
beforeEach(() => {
|
|
propsData = {
|
|
author: {
|
|
id: 'u-123',
|
|
slug: 'user-123',
|
|
name: 'User 123',
|
|
},
|
|
}
|
|
mocks = {
|
|
$t: jest.fn((t) => t),
|
|
}
|
|
})
|
|
|
|
const Wrapper = () => {
|
|
return shallowMount(Component, { propsData, localVue, mocks })
|
|
}
|
|
|
|
describe('shallowMount', () => {
|
|
beforeEach(() => {
|
|
wrapper = Wrapper()
|
|
})
|
|
|
|
it('renders', () => {
|
|
expect(wrapper).toMatchSnapshot()
|
|
})
|
|
})
|
|
})
|