Derick Montague | fded0d1 | 2019-12-11 06:16:40 -0600 | [diff] [blame^] | 1 | import { shallowMount } from '@vue/test-utils'; |
| 2 | import HelloWorld from '@/components/HelloWorld.vue'; |
Derick Montague | a2988f4 | 2020-01-17 13:46:30 -0600 | [diff] [blame] | 3 | |
Derick Montague | fded0d1 | 2019-12-11 06:16:40 -0600 | [diff] [blame^] | 4 | describe('HelloWorld.vue', () => { |
| 5 | it('renders props.msg when passed', () => { |
| 6 | const msg = 'new message'; |
Derick Montague | a2988f4 | 2020-01-17 13:46:30 -0600 | [diff] [blame] | 7 | const wrapper = shallowMount(HelloWorld, { |
| 8 | propsData: { msg } |
| 9 | }); |
| 10 | expect(wrapper.text()).toMatch(msg); |
| 11 | }); |
| 12 | }); |