title: Using vue and jest to testing svg inline
body: <p>I have problem with testing view when I use image inline in code
  <code>'src/assets/icons/circle-small.svg?inline'</code></p>
  
  <p>I have versions:</p>
  
  <pre>
  - babel-jest: 23.6.0
  - vue: 2.6.10
  </pre>
  
  <p>Configuration:</p>
  
  <p>Vue CLI:</p>
  
  <pre><code>const svgRule = config.module.rule('svg');
  svgRule.oneOf('inline').use('vue-svg-loader').loader('vue-svg-loader').end();
  </code></pre>
  
  <p>Jest config:</p>
  
  <pre><code>  moduleFileExtensions: [
      'js',
      'vue',
    ],
    transform: {
      '^.+\\.vue$': 'vue-jest',
      '^.+\\.js$': '&lt;rootDir&gt;/babel-jest',
      '.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2|svg)$': 'jest-transform-stub',
    },
    moduleNameMapper: {
      '^@/(.*)$': '&lt;rootDir&gt;/src/$1',
    },
  </code></pre>
  
  <p>I import in view:</p>
  
  <pre><code>import Img from '@/assets/icons/img.svg?inline';
  </code></pre>
  
  <p>I getting configuration error:</p>
  
  <pre><code>Could not locate module @/assets/icons/circle-small.svg?inline mapped as:
  /some/src/assets/icons/circle-small.svg?inline.
  
  Please check your configuration for these entries:
  {
    "moduleNameMapper": {
      "/^@\/(.*)$/": "/some/src/$1"
    },
    "resolver": null
  }
  </code></pre>
  
  <p>I have a problem with configuring tests for the case when I import inline image. Can anyone know what else i should to configure or what library to use?</p>