Skip to content

Instantly share code, notes, and snippets.

@agcty
Created May 19, 2019
Embed
What would you like to do?
Logo Jest test sample
import { shallowMount } from "@vue/test-utils";
import Logo from "../Logo";
const factory = () => {
return shallowMount(Logo, {
});
};
describe("Logo", () => {
test("mounts properly", () => {
const wrapper = factory();
expect(wrapper.isVueInstance()).toBeTruthy();
});
test("renders properly", () => {
const wrapper = factory();
expect(wrapper.html()).toMatchSnapshot();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment