Created
May 19, 2019 14:29
-
-
Save agcty/0644828a18d53c38a1de4bf1c8be3044 to your computer and use it in GitHub Desktop.
Logo Jest test sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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