title: Vue3 Vite and tests with jest has no template compiler
body: <p>i use a codebase made with Vue3 Vite, but i cannot find a way to run a simple Jest test importing a component.
  This works fine in an app create with Vue-cli, but i cannot find a way to make Jest work in a Vue-Vite app with Vue3.
  Here is the error I encounter</p>
  <pre><code> FAIL  docs/homepage.spec.js
    ● Test suite failed to run
  
  
  
      Vue packages version mismatch:
  
      - vue@3.0.0 (/var/www/html/my_project_vue3_vite/node_modules/vue/index.js)
      - vue-template-compiler@2.6.12 (/var/www/html/my_project_vue3_vite/node_modules/vue-template-compiler/package.json)
  </code></pre>
  <p>but vue-template-compiler does not exist yet in version 3, so no way to make it work today.</p>
  <p>i found this example repo, but it uses Mocha and Chai, not Jest, and i cannot find a way to adapt it.
  <a href="https://github.com/JessicaSachs/vite-component-test-starter" rel="nofollow noreferrer">https://github.com/JessicaSachs/vite-component-test-starter</a></p>
  <p>here is my package json :</p>
  <pre><code>{
    &quot;name&quot;: &quot;front-operation&quot;,
    &quot;version&quot;: &quot;0.1.0&quot;,
    &quot;scripts&quot;: {
      &quot;dev&quot;: &quot;vite&quot;,
      &quot;build&quot;: &quot;vite build&quot;,
      &quot;start&quot;: &quot;npm run dev &amp;&amp; wait-on http://localhost:3000&quot;,
      &quot;test&quot;: &quot;jest --coverage&quot;,
      &quot;tdd:vite&quot;: &quot;vite --config test/vite.config.test.js&quot;,
      &quot;tdd&quot;: &quot;aria-vue -w --path test-ui --script test/plugins.js&quot;,
      &quot;headless&quot;: &quot;aria-vue --offline -w -H --script test/plugins.js &quot;,
      &quot;test:watch&quot;: &quot;jest --watch&quot;,
      &quot;test:ci&quot;: &quot;jest --ci&quot;,
      &quot;lint&quot;: &quot;prettier --write \&quot;src/**/*.{js,jsx,ts,tsx,md,html,css,scss}\&quot;&quot;,
      &quot;e2e&quot;: &quot;jest&quot;,
      &quot;format:check&quot;: &quot;prettier --list-different \&quot;src/{app,environments,assets}/**/*{.ts,.js,.json,.css,.scss}\&quot;&quot;,
      &quot;format:all&quot;: &quot;prettier --write \&quot;src/**/*.{js,jsx,ts,tsx,md,html,css,scss}\&quot;&quot;,
      &quot;doc&quot;: &quot;compodoc -p tsconfig.json src &quot;,
      &quot;mock:server&quot;: &quot;json-server --port 8000 --watch ./src/mocks/db.json --routes ./src/mocks/routes.json&quot;,
      &quot;start:proxy&quot;: &quot;vite serve --proxy-config proxy.conf.json&quot;,
      &quot;start:proxymock&quot;: &quot;concurrently --kill-others \&quot;npm run mock:server\&quot; \&quot;yarn start:proxy\&quot;&quot;
    },
    &quot;dependencies&quot;: {
      &quot;@tailwindcss/typography&quot;: &quot;^0.2.0&quot;,
      &quot;@tailwindcss/ui&quot;: &quot;^0.6.2&quot;,
      &quot;@vue/compiler-sfc&quot;: &quot;3.0.0&quot;,
      &quot;axios&quot;: &quot;^0.21.0&quot;,
      &quot;core-js&quot;: &quot;^3.6.5&quot;,
      &quot;jest&quot;: &quot;^26.6.1&quot;,
      &quot;moment&quot;: &quot;^2.29.1&quot;,
      &quot;qrcode.vue&quot;: &quot;^1.7.0&quot;,
      &quot;tailwindcss&quot;: &quot;^1.8.12&quot;,
      &quot;vue&quot;: &quot;3.0.0&quot;,
      &quot;vue-template-compiler&quot;: &quot;^2.6.12&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@babel/preset-typescript&quot;: &quot;^7.12.1&quot;,
      &quot;@types/jest&quot;: &quot;^24.0.19&quot;,
      &quot;@types/koa-router&quot;: &quot;^7.4.1&quot;,
      &quot;@typescript-eslint/eslint-plugin&quot;: &quot;^4.4.0&quot;,
      &quot;@typescript-eslint/parser&quot;: &quot;^4.4.0&quot;,
      &quot;@vue/babel-preset-app&quot;: &quot;^4.5.8&quot;,
      &quot;@vue/eslint-config-standard&quot;: &quot;^5.1.2&quot;,
      &quot;@vue/eslint-config-typescript&quot;: &quot;^7.0.0&quot;,
      &quot;@vue/test-utils&quot;: &quot;2.0.0-beta.5&quot;,
      &quot;aria-mocha&quot;: &quot;0.5.2&quot;,
      &quot;aria-vue&quot;: &quot;0.4.1&quot;,
      &quot;autoprefixer&quot;: &quot;^6.7.7&quot;,
      &quot;babel-core&quot;: &quot;^7.0.0-bridge.0&quot;,
      &quot;compodoc&quot;: &quot;0.0.41&quot;,
      &quot;eslint&quot;: &quot;^7.10.0&quot;,
      &quot;eslint-plugin-vue&quot;: &quot;^7.0.1&quot;,
      &quot;faker&quot;: &quot;^5.1.0&quot;,
      &quot;husky&quot;: &quot;^4.3.0&quot;,
      &quot;jest&quot;: &quot;^26.6.1&quot;,
      &quot;jest-cli&quot;: &quot;^26.6.1&quot;,
      &quot;jest-config&quot;: &quot;^26.6.1&quot;,
      &quot;jest-css-modules&quot;: &quot;^2.1.0&quot;,
      &quot;jest-each&quot;: &quot;^26.6.1&quot;,
      &quot;jest-puppeteer&quot;: &quot;^4.4.0&quot;,
      &quot;jest-serializer-vue&quot;: &quot;^2.0.2&quot;,
      &quot;jest-vue-preprocessor&quot;: &quot;^1.7.1&quot;,
      &quot;json-server&quot;: &quot;^0.16.2&quot;,
      &quot;lint-staged&quot;: &quot;^10.5.0&quot;,
      &quot;prettier&quot;: &quot;^2.1.2&quot;,
      &quot;puppeteer&quot;: &quot;^5.4.1&quot;,
      &quot;ts-jest&quot;: &quot;^26.4.3&quot;,
      &quot;ts-node&quot;: &quot;^9.0.0&quot;,
      &quot;typescript&quot;: &quot;^4.0.3&quot;,
      &quot;vite&quot;: &quot;^1.0.0-rc.4&quot;,
      &quot;vue-gue&quot;: &quot;^0.2.0&quot;,
      &quot;vue-jest&quot;: &quot;^3.0.7&quot;,
      &quot;wait-on&quot;: &quot;^5.2.0&quot;
    },
    &quot;husky&quot;: {
      &quot;hooks&quot;: {
        &quot;pre-commit&quot;: &quot;lint-staged&quot;
      }
    },
    &quot;lint-staged&quot;: {
      &quot;src/**/*.{js,jsx,ts,tsx,md,html,css,scss}&quot;: [
        &quot;prettier --write&quot;,
        &quot;git add&quot;
      ],
      &quot;*.js&quot;: [
        &quot;prettier --write&quot;
      ]
    }
  }
  </code></pre>