Skip to content

Commit

Permalink
chore: remove obsolete documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiller1990 authored and cexbrayat committed Jul 21, 2023
1 parent 6af516a commit 11b3474
Showing 1 changed file with 0 additions and 61 deletions.
61 changes: 0 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,64 +24,3 @@ See the [docs](https://test-utils.vuejs.org/).
## Development

Get started by running `pnpm install`. You can run the tests with `pnpm test`. That's it!

## Comparison with Vue Test Utils v1 (targeting Vue 2)

This is table for those coming from VTU 1, comparing the two APIs. Some things are still a work in progress.

- ✅ - implemented
- ❌ - not yet implemented
- ⚰️ - will not be implemented (if you have a compelling use case, please open an issue)

### Mounting Options

| option | status | notes |
|------------------|--------|-----------------------------------------------------------------------------------|
| data ||
| slots ||
| mocks || nested in `global` |
| propsData || now called `props` |
| provide || nested in `global` |
| mixins || (new!) nested in `global` |
| plugins || (new!) nested in `global` |
| component || (new!) nested in `global` |
| directives || (new!) nested in `global` |
| stubs ||
| attachToDocument || renamed `attachTo`. See [here](https://github.com/vuejs/vue-test-utils/pull/1492) |
| attrs ||
| scopedSlots | ⚰️ | scopedSlots are merged with `slots` in Vue 3 |
| context | ⚰️ | different from Vue 2, does not make sense anymore. |
| localVue | ⚰️ | no longer required - Vue 3 there is no global Vue instance to mutate. |
| listeners | ⚰️ | no longer exists in Vue 3 |
| parentComponent | ⚰️ |

### Wrapper API (mount)

| method | status | notes |
|----------------|--------|-------------------------------------------------------------------------------------------------------------------------------------|
| attributes ||
| classes ||
| exists ||
| find || only `querySelector` syntax is supported. `find(Comp)` under discussion [here](https://github.com/vuejs/vue-test-utils/issues/1498) |
| emitted ||
| findAll || see above. `.vm` is different to Vue 2. We are exploring options. |
| get ||
| html ||
| setValue || works for select, checkbox, radio button, input, textarea. Returns `nextTick`. |
| text ||
| trigger || returns `nextTick`. You can do `await wrapper.find('button').trigger('click')` |
| setProps ||
| props ||
| setData ||
| destroy || renamed to `unmount` to match Vue 3 lifecycle hook name. |
| props ||
| isVisible ||
| contains | ⚰️ | use `find` |
| emittedByOrder | ⚰️ | use `emitted` |
| setSelected | ⚰️ | now part of `setValue` |
| setChecked | ⚰️ | now part of `setValue` |
| is | ⚰️ |
| isEmpty | ⚰️ | use matchers such as [this](https://github.com/testing-library/jest-dom#tobeempty) |
| isVueInstance | ⚰️ |
| name | ⚰️ |
| setMethods | ⚰️ |

0 comments on commit 11b3474

Please sign in to comment.