text: import { mount } from '@vue/test-utils'
  
  const FetchDataFromApi = {
    name: 'FetchDataFromApi',
    template: `
      <div>{{ result }}</div>
    `,
    async mounted() {
      const res = await axios.get('/api/info')
      this.result = res.data
    },
    data() {
      return {
        result: ''
      }
    }
  }
  
  const App = {
    components: {
      FetchDataFromApi
    },
    template: `
      <h1>Welcome to Vue.js 3</h1>
      <fetch-data-from-api />
    `
  }
  
  test('stubs component with custom template', () => {
    const wrapper = mount(App, {
      global: {
        stubs: {
          FetchDataFromApi: {
            template: '<span />'
          }
        }
      }
    })
  
    // console.log(wrapper.html())
    // <h1>Welcome to Vue.js 3</h1><span></span>
  
    expect(wrapper.html()).toContain('Welcome to Vue.js 3')
  })
  
  test('stubs component', () => {
    const wrapper = mount(App, {
      global: {
        stubs: {
          FetchDataFromApi: true
        }
      }
    })
  
    /*
    console.log(wrapper.html())
      <h1>Welcome to Vue.js 3</h1>
      <fetch-data-from-api-stub></fetch-data-from-api-stub>
    */
  
    expect(wrapper.html()).toContain('Welcome to Vue.js 3')
  })
  
  