Created
March 12, 2019 21:52
-
-
Save brpaz/7deb2da103e30605537eebf0672f501b to your computer and use it in GitHub Desktop.
#vuejs #testing
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 HelloWorld from '@/components/HelloWorld.vue'; | |
describe('HelloWorld.vue', () => { | |
it('renders props.msg when passed', () => { | |
const msg = 'new message'; | |
const wrapper = shallowMount(HelloWorld, { | |
propsData: { msg }, | |
}); | |
expect(wrapper.text()).toMatch(msg); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment