import SnippetDescription from '~/snippets/components/snippet_description_view.vue';
import { shallowMount } from '@vue/test-utils';
describe('Snippet Description component', () => {
let wrapper;
const description = '
The property of Thor
';
function createComponent() {
wrapper = shallowMount(SnippetDescription, {
propsData: {
description,
},
});
}
beforeEach(() => {
createComponent();
});
afterEach(() => {
wrapper.destroy();
});
it('matches the snapshot', () => {
expect(wrapper.element).toMatchSnapshot();
});
});