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.2.3

Published by lmiller1990 almost 2 years ago

What's Changed

Full Changelog: https://github.com/vuejs/test-utils/compare/v2.2.2...v2.2.3

test-utils - v2.2.2

Published by lmiller1990 almost 2 years ago

Fixes

Other

Full Changelog: https://github.com/vuejs/test-utils/compare/v2.2.1...v2.2.2

test-utils - v2.2.1

Published by lmiller1990 almost 2 years ago

What's Changed

Full Changelog: https://github.com/vuejs/test-utils/compare/v2.2.0...v2.2.1

test-utils - v2.2.0

Published by lmiller1990 almost 2 years ago

What's Changed

Features

Fixes

Other

New Contributors

Full Changelog: https://github.com/vuejs/test-utils/compare/v2.1.0...v2.2.0

test-utils - v2.1.0

Published by lmiller1990 about 2 years ago

What's Changed

Fixes

Other

Chore

New Contributors

Full Changelog: https://github.com/vuejs/test-utils/compare/v2.0.2...v2.1.0

test-utils - v2.0.2

Published by lmiller1990 over 2 years ago

What's Changed

Fixes

Docs

Chore/Other

New Contributors

Full Changelog: https://github.com/vuejs/test-utils/compare/v2.0.1...v2.0.2

test-utils - v2.0.1

Published by lmiller1990 over 2 years ago

Test Utils is quite stable now, so most of the changes here are minor fixes.

The next "big ticket" feature will be SSR support. You can track it here: https://github.com/vuejs/test-utils/pull/1572

Fixes

Chores/Dependencies

New Contributors

Full Changelog: https://github.com/vuejs/test-utils/compare/v2.0.0...v2.0.1

test-utils - v2.0.0

Published by lmiller1990 over 2 years ago

This is v2.0.0. The library is quite stable and there are not major bugs.

What's Changed

New Contributors

Full Changelog: https://github.com/vuejs/test-utils/compare/v2.0.0-rc.21...v2.0.0

test-utils - v2.0.0-rc.21

Published by lmiller1990 over 2 years ago

This is the final release candidate, unless something major comes up. We will move to 2.0.0 next release.

test-utils - v2.0.0-rc.20

Published by lmiller1990 over 2 years ago

What's Changed

New Contributors

Full Changelog: https://github.com/vuejs/test-utils/compare/v2.0.0-rc.19...v2.0.0-rc.20

test-utils - v2.0.0-rc.18

Published by lmiller1990 almost 3 years ago

We are edging closer to a 2.0.0. This release contains many small fixes, mainly related to niche edge cases.

Fixes

fix: stringify symbol props in stubs (#1086)
fix: Remove methods key from mount (#1145)
Fix: Use defaultName when it exists to correctly stub async components (#1136)
fix(find): allow finding stubs by stub definition (#1113)
fix(emitted): do not track native events on multi-root components (#1121)
fix(html): ensure wrapper.html() works correctly for multi-root (#1120)
fix(find): implement proper find for multi-root components (#1116)
fix(find): do not find DOM node by ref if it is not inside element b118e9aa956a81997dc1276583c0f48c5a767387
fix(find): finding by ref may return Node, not just Element 125ea2fa6c0c757c0628f21aa1b1f60f996ca323

Other

chore(findComponent): refactor find & findComponent (fixes #716, #899)
chore(compat): Always treat legacy functional components as function bb44d9e4b92b852db7dc588c0d663f33739d41de

test-utils - v2.0.0-rc.17

Published by lmiller1990 almost 3 years ago

There is one minor breaking change that may impact people using shallowMount with snaphots, see #1066.

Breaking

  • fix: [BREAKING] Use default name for components with setup script and nameless component (#1066)
  • [BREAKING] remove circular dep - DOMWrapper now requires the VueWrapper it is contained within as the second arg: #1093. This is to support finding a VueWrapper within a DOMWrapper using findComponent

Features

  • feat: add ability to stub teleport (#1087)

Fixes

  • fix(compat): handle listeners, class and style in legacy functional (#1080)
  • fix(mount): pass unknown options to $options on mount (#1079)
  • fix(findComponent): favor displayName over name when searching (#1078)
  • fix(find): Allow finding self from DOMWrapper (#1077)
  • fix: expose with render function (#1067)
test-utils - v2.0.0-rc.16

Published by lmiller1990 about 3 years ago

We are getting near to a 2.0.0. Follow this thread for details.

The main feature here is the return of the ability to use findComponent with a DOM selector, for example findComponent('#some-id'). Read more here: https://github.com/vuejs/vue-test-utils-next/issues/689. Thanks @xanf and @cexbrayat for all the work!

Features

  • feat: add enableAutoUnmount feature (#998)

Fixes

  • fix: return ability to use findComponent with DOM selector (#994)

Other

  • chore: bump to vue v3.2.16 and fix devtools (#971)
test-utils - v2.0.0-rc.15

Published by lmiller1990 about 3 years ago

This release improves support for <script setup>, and updates the Vue version, ensuring everything continues working with the latest version of Vue.

Features

A little controversial, the discussion is worth a look. Generally, you don't want to test or assert against values on vm, but rather the public API (usually the rendered DOM).

  • feat: export createWrapperError

Deps

  • chore: bump to Vue 3.2.11
test-utils - v2.0.0-rc.14

Published by lmiller1990 about 3 years ago

Features

This release only has one user facing change.

feat(find): allow chaining find with findComponent (#897)

test-utils - v2.0.0-rc.13

Published by lmiller1990 about 3 years ago

This is huge release with many bug fixes. If this release breaks something for you, please file an issue.

The majority of this release was authored by @xanf - thank you for your ongoing efforts!

Breaking Changes

breaking: remove ability to use findComponent with DOM selector (#896)

Note: this may come back, it is an ongoing discussion. If you think it's important, you could make an issue. If you want to find a component, you generally can use findComponent or getComponent.

Fixes

fix(find): allow finding root without name (#836)
fix(slots): does not expose extra wrapper of slot content (#844)
fix(mount): support passing data when immediate watchers are present #840
fix(findComponent): return root instance if it matches (#834)
fix: do not crash findComponent if ref is pointing to html element (#817 …
fix(stubs): Do not create stubs across multiple renders (#813)
fix(stubs): Do not create stubs across multiple renders (#813)
fix(compat): avoid warning about non-existing export
fix: Always wrap string passed to slot in a helper component (#815) …

Other

chore(types): improve types of vueWrapper (#823) …
chore(types): add Array of strings as valid type for stubs
chore(types): add proper type for propsDeclaration
chore(types): improve global.stubs definition
chore(types): remove unused props in StubOptions
chore(stubs): simplify global stubs registration (#841)
chore(find): simplify vnode traversal (#835)
chore(deps): bump vue to 3.2 (#889)

test-utils - v2.0.0-rc.12

Published by lmiller1990 about 3 years ago

Fixes

Fix a bug in rc.11 where the types were not correctly shipped. It's not clear why this happened - our build/release process has not changed in a long time. Apologies if you were on rc.11 and the types were not working as expected.

test-utils -

Published by lmiller1990 about 3 years ago

This release is quite small; one fix, some refactors and some updates to docs.

fix(setData): do not concat previous and new array values #767

refactor: use jest.advanceTimersByTime in async test https://github.com/vuejs/vue-test-utils-next/pull/780
refactor: faster suspense test https://github.com/vuejs/vue-test-utils-next/pull/779

chore: remove volar workaround #760
chore: rename slot variables in tests #759
chore: migrate example to TS #758
chore: format vue files #757
chore: remove allowJs from TS config #743

docs: update function name #789
docs: update url #776
docs: document .at deprecation #736
docs: remove useless import (#735)

test-utils - v2.0.0-rc.10

Published by lmiller1990 over 3 years ago

This is a big release with @xanf adding a lot of support for the Vue Compat build. We are now running against the latest Vue version (3.1.2).

Features

feat: support passing component with template to slots
feat(compat): support legacy functional components (#703)
feat(compat): correctly stub components, wrapped in Vue.extend
feat: add @vue/compat initial support (#698)

Fixes

fix(compat): do not stub legacy functional component root
fix(compat): correctly render default slot in stub if requested (#717)
fix: support passing functional components as stub implementation (#700)
fix: Allow finding component by definition when using shallow mount (#696)
fix: opt-out of stubbing by passing false as stub (#702)
fix: do not stub slots content when using shallow mount (#697)
fix: find component by its definition when using stub without name (#704 …
fix(shallow): correctly stub anonymous components (#714)
fix: findComponent should work using same stub for different components

Other

docs: add example of passing object with template property to slot
chore: improve typings of isComponent helpers
chore: Remove outdated comments about template object support in slots