test-utils

Vue Test Utils for Vue 3

MIT License

Downloads
7.2M
Stars
1K
Committers
156

Bot releases are hidden (Show)

test-utils - v2.0.0-rc.9

Published by lmiller1990 over 3 years ago

Fixes

This reverts this change which was released in v2.0.0-rc.8, relating to the extension. See the PR for an extended discussion.

We will figure out the best approach to supporting the correct .mjs extension for Test Utils and the rest of the Vue core ecosystem prior to Vue 3.x becoming the main branch on npm.

test-utils - v2.0.0-rc.8

Published by lmiller1990 over 3 years ago

Features

Fix broken module entry point.

test-utils - v2.0.0-rc.7

Published by lmiller1990 over 3 years ago

Many small bug fixes in this release. Please file an issue if you find a problem. We are nearing a 2.0.0 release.

Features

feat: array of slots (#599)
feat: add isVisible to VueWrapper (#628)

Fixes

fix: use .mjs extension for ESM bundles
fix: capture emitted events from script setup components (#663)
fix: use prefix identifiers for cjs build (#661)
fix: Gracefully handle empty root node for nested component (#660)
fix: better errors for async find (#641)
fix: shallow config issue (#607)
fix: shallowMount with stub props (#610)
fix: use flushPromises from @vue/test-utils

Other

chore: Add @vue/compiler-dom dep (#591)

test-utils - v2.0.0-rc.6

Published by lmiller1990 over 3 years ago

Fixes

  • emits can be an object (#542)
test-utils - v2.0.0-rc.5

Published by lmiller1990 over 3 years ago

Lots of fixes. One breaking change around updating props for v-model. See #459 for the PR and #440 for the discussion and rationale.

Breaking Changes

  • fix: revert automatic two way sync of v-model prop values (#459)

Fixes

  • using find after using findAllComponents does not match expectations. Fixes #484
  • allow global components to be stubbed #504
  • use displayName only for functional components #495
  • pretty print wrapper.html() output (#510)
  • Stub out components prior by key than by name #518
  • avoid using prefixIdenntifier in esm (#519)
  • don't record native events that are included in emits option #444
  • make data mounting option reactive (#540)

Docs

  • add link to docs for slots resolves #452
  • component instance (#466)
test-utils - v2.0.0-rc.4

Published by lmiller1990 over 3 years ago

Features

  • feat: make isVisible more comprehensive (#454)

Fixes

  • fix: stubbing RouterLink (#438)
  • fix: reactive props for stubs (#453)

Other

  • chore: add LICENSE file (fix #441)
test-utils - v2.0.0-rc.3

Published by lmiller1990 over 3 years ago

This release includes a minor fix to work around a (internal only) breaking change in Vue 3.0.7.

Fixes

  • Vue 3.0.7 compatibility by fixing a bug related to capturing emitted events #437
test-utils - v2.0.0-rc.2

Published by lmiller1990 over 3 years ago

Fixes

  • fix: Added prop update on emit for v-model #393
  • fix: record native events against each wrapper they bubble through #394
  • fix: unmount takes no argument since vue-next v3.0.6 #422
  • fix: add hasOwnProperty to wrapper.vm #310

Other

  • enabled better linting
  • enabled strict mode for TypeScript
test-utils - v2.0.0-rc.1

Published by lmiller1990 over 3 years ago

Minor bug fixes.

Fixes

  • enabled strict mode (@nandi95)
  • fix a bug where events are incorrectly captured (@aethr, #354)
  • support <script setup> for shallowMount (@rrittwag, #358)
  • ignore comments when returning text() (@cexbrayat, #342)
test-utils - v2.0.0-rc.0

Published by lmiller1990 over 3 years ago

Things are quite stable at this point. It's unlikely the API will change any time soon. This release candidates marks the final transition towards a stable 2.0.

Fixes

  • use devtools emit hook to capture emitted events #296 @cuixiaorui.

This fixes some edge cases, like capturing an emit event inside of setup prior to the component getting mounted.

Docs

The docs are now hosted in this repo, as opposed to a separate repo. They are built using Vitepress and deployed via Netlify. Thanks to @bencodezen and @afontcu for making this happen.

Tests

  • add a regression tests for setData and watch @lmiller1990
test-utils -

Published by afontcu almost 4 years ago

Features

feat(types): infer options in plugins #282 by @posva
feat: make jest debug in vscode available #284 by @HomyeeKing

Fixes

fix: render props in stubs #287 by @lmiller1990

test-utils - v2.0.0-beta.13

Published by lmiller1990 almost 4 years ago

Fixes

ensure plugins receive options correctly #276 @lmiller1990
handle slots correctly #277

Types

fix mount infer prop type #274 @pikax
uncommented new prop tests and add defaultProps to all mount #274 @pikax

test-utils - v2.0.0-beta.12

Published by lmiller1990 almost 4 years ago

This release adds support for the latest <script setup> RFC. That's it. Read about it here: #264.

If you want to use it, you need Vue 3.0.3. You will also want the latest vue-jest (5.0.0 alpha 7 at the time of this). Get it with yarn add vue-jest@next. Note the latest RFC is here: https://github.com/vuejs/rfcs/pull/227

Features

  • Support latest <script setup> (#264) by @lmiller1990
test-utils -

Published by afontcu almost 4 years ago

Features

Stub global components (https://github.com/vuejs/vue-test-utils-next/pull/260) by @lmiller1990
Export MountingOptions interface (https://github.com/vuejs/vue-test-utils-next/pull/252) by @afontcu

Fixes

Fix mount and shallowMount types (https://github.com/vuejs/vue-test-utils-next/pull/254) by @pikax

test-utils - v2.0.0-beta.10

Published by lmiller1990 almost 4 years ago

Fixes

  • Fix various bugs and support vue-class-component (tested with 8.0.0-beta.4).
test-utils - v2.0.0-beta.9

Published by lmiller1990 almost 4 years ago

Features

  • Add esm browser build @zigomir

Fixes

  • feat: default values for global.config @posva
  • fix: findComponent with functional components @lmiller1990
test-utils - v2.0.0-beta.8

Published by lmiller1990 almost 4 years ago

Features

  • add setData: #230 @afontcu

Fixes

  • improve types and add type test @pikax
  • wrap functional components in order to capture emitted events @lmiller1990
test-utils - v2.0.0-beta.7

Published by lmiller1990 about 4 years ago

Small release. Mainly typing improvements/fixes, and some small bug fixes.

Once the open issues about functional components are fixed and docs completed (few sections outstanding) we will move to RC. Goal is to be 2.0.0 by the end of the year.

Fixes:

fix: set default event.cancelable from dom-event-types @aethr
fix: correctly capture DOM/Vue wrapper type @HerringtonDarkholme
fix: error handling in suspense @cexbrayat
refactor: do not pollute markup with useless id @lmiller1990

Types

Vue 3 is still young, and the types are evolving.

fix: support for DefineComponent shim @pikax

test-utils - v2.0.0-beta.6

Published by lmiller1990 about 4 years ago

Features

test-utils - v2.0.0-beta.5

Published by lmiller1990 about 4 years ago

Features:

  • feat(mount): add (deprecated) support for propsData @WebDevEtc. This is useful for migration purposes.
  • bump to and make compatible with rc.12

Fixes

  • fix: findComponent in Suspense for rc.11 @cexbrayat
  • fix: trim slot when passed as a string (avoid weird SFC compiler error) @lmiller1990