-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy path8.1b1a6480.js
1 lines (1 loc) · 2.3 KB
/
8.1b1a6480.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{207:function(e,t,r){"use strict";r.r(t);var n=r(28),s=Object(n.a)({},(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h2",{attrs:{id:"installation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#installation"}},[e._v("#")]),e._v(" Installation")]),e._v(" "),r("ul",[r("li",[e._v("npm: "),r("code",[e._v("npm install --save-dev @vue/test-utils@next")])]),e._v(" "),r("li",[e._v("yarn: "),r("code",[e._v("yarn add --dev @vue/test-utils@next")])])]),e._v(" "),r("h2",{attrs:{id:"usage"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[e._v("#")]),e._v(" Usage")]),e._v(" "),r("p",[e._v("Vue Test Utils is framework agnostic - you can use it with whichever test runner you like. The easiest way to try it out is using "),r("a",{attrs:{href:"https://jestjs.io/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Jest"),r("OutboundLink")],1),e._v(", a popular test runner.")]),e._v(" "),r("p",[e._v("To load "),r("code",[e._v(".vue")]),e._v(" files with Jest, you will need "),r("code",[e._v("vue-jest")]),e._v(". "),r("code",[e._v("vue-jest")]),e._v(" v5 is the one that supports Vue 3. It is still in alpha, much like the rest of the Vue.js 3 ecosystem, so if you find a bug please report it "),r("a",{attrs:{href:"https://github.com/vuejs/vue-jest/",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),r("OutboundLink")],1),e._v(" and specify you are using "),r("code",[e._v("vue-jest")]),e._v(" v5.")]),e._v(" "),r("p",[e._v("You can install it with "),r("code",[e._v("vue-jest@next")]),e._v(". Then you need to configure it with Jest's "),r("a",{attrs:{href:"https://jestjs.io/docs/en/configuration#transform-objectstring-pathtotransformer--pathtotransformer-object",target:"_blank",rel:"noopener noreferrer"}},[e._v("transform"),r("OutboundLink")],1),e._v(" option.")]),e._v(" "),r("p",[e._v("If you dont want to configure it yourself, you can get a minimal repository with everything set up "),r("a",{attrs:{href:"https://github.com/lmiller1990/vtu-next-demo",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),r("OutboundLink")],1),e._v(".")]),e._v(" "),r("p",[e._v("Continue reading to learn more about Vue Test Utils.")])])}),[],!1,null,null,null);t.default=s.exports}}]);