nuxt-community / fontawesome-module

Module to use Font Awesome icons in Nuxt.js
MIT License
110 stars 12 forks source link

jest mock #33

Closed sebalaini closed 3 years ago

sebalaini commented 3 years ago

I've installed this package plus the fortawesome ones and everything works OK.

this is my config:

  buildModules: [
    ....
    ['nuxt-fontawesome', {
      component: 'fa',
      imports: [
        {
          set: '@fortawesome/free-solid-svg-icons',
          icons: ['fas']
        },
        {
          set: '@fortawesome/free-regular-svg-icons',
          icons: ['far']
        }
      ]
    }]
  ],

when I run tests jest complaining about:

 [Vue warn]: Unknown custom element: <fa> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

how can I stub it?

sebalaini commented 3 years ago

sorry I didn't realize was the same as https://github.com/nuxt-community/fontawesome-module/issues/32 will close this and follow the other one