Skip to content

Instantly share code, notes, and snippets.

@agcty
Created May 19, 2019 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agcty/0644828a18d53c38a1de4bf1c8be3044 to your computer and use it in GitHub Desktop.
Save agcty/0644828a18d53c38a1de4bf1c8be3044 to your computer and use it in GitHub Desktop.
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