hello.spec.js 369 B

12345678910111213
  1. import {shallowMount} from '@vue/test-utils'
  2. import HelloWorld from '@/components/modules/helloWorld.vue'
  3. describe('helloWorld.vue', () => {
  4. it('renders props.msg when passed', () => {
  5. const msg = 'new message'
  6. const wrapper = shallowMount(HelloWorld, {
  7. propsData: {msg}
  8. })
  9. expect(wrapper.text()).toMatch(msg)
  10. })
  11. })