Vue-test-utils: Initial TODOs

Created on 6 Jun 2017  ยท  19Comments  ยท  Source: vuejs/vue-test-utils

I copied over the TODOs from https://github.com/vuejs/vue-test-utils/issues/1#issuecomment-305899792 so it's not necessary to hunt them down in the long thread.

TODOs

  • [x] Add shallow method
  • [x] Add emit method? In the proposal this is included in trigger, but it's difficult(impossible?) to implement. Not sure if this is needed, as it will be a thin wrapper around vm.$emit. Won't be added in first version,See #6
  • [x] Add option to stub components
  • [x] Finalize VueWrapper interface. Should it call methods on all wrappers, or default to first wrapper? Using find and findAll
  • [x] Add context option to support functional components see #12
  • [x] Test find and findAll using functional component with context
  • [x] Add flow
  • [x] Add typescript types
  • [x] Handle empty WrapperArray method calls
  • [x] Handle ErrorWrapper method calls
  • [x] Fix some skipped tests copied from avoriaz
  • [x] Link docs to gitbook
  • [x] add deploy script
  • [x] Update docs format to follow Vue docs style
  • [x] Improve docs, especially info on WrapperArray
  • [x] Improve build pipeline. Should dist be included in the source repo?
  • [x] Add CI tool - travis/ circle
  • [x] Add provide option to mount
  • [x] Add way to add global mixins/plugins/components without polluting global Vue. See #2
  • [x] Add ability to test emitted events - although this can be acheived with wrapper.vm.$on('event', spy). Won't be added in first version, See #6
  • [x] Add a README
  • [x] Link to Documentation in README
  • [x] Add option to pass component as stub, see #11
  • [x] Add release script
  • [x] Stub registered global components when running shallow
  • [x] Throw an error about running in a browser if window is undefined
  • [x] Add git pre commit hooks to check commit message matches guidelines
  • [x] Improve error messages (errors should have format - [vue-test-utils]: error message)
  • [x] Handle options.instance when stubbing global components in shallow
  • [x] Add option to pass array to options.stub
  • [x] Add children option to pass children to functional components
  • [x] Set default branch to dev
  • [x] Remove npm postinstall from master/ release branches
  • [x] Create example projects and link in README
  • [x] Add guides on setting up vue-test-utils
  • [x] Update mount and shallow arguments in documentation

Most helpful comment

Evan's reviewing the code this week and we're planning to publish a beta on npm

All 19 comments

(added checkboxes to track progress)

@codebryo @LinusBorg Is anyone working on the typings? I could probably help there if not, just let me know!

@snaptopixel No, would be great if you could make a PR ๐Ÿ˜„

If you do, please follow the new commit convention - https://github.com/vuejs/vue/blob/dev/.github/COMMIT_CONVENTION.md

Are we ready to publish a Beta of the library? Someone already has vue-test-utils on npm, should we reach out and see if we could get that package spot or rename this repo to one we can get on npm

@yyx990803 has already been in touch with the author. I'm happy to publish a beta once it becomes available

@eddyerburgh do we have a gitbook for the docs under development already? I would like to get started on that, and add a bunch of examples.

There isn't a gitbook that it's hooked up to, but the /docs directory is in the format requried for a gitbook. It even has a book.json. All that needs to be done is add gitbooks itself to the project.

It would be great for you to start working on it ๐Ÿ‘

@snaptopixel we still need typings, and I haven't got much experience with typescript. Are you still willing to add them?

Hi Jason, we do have the name, but since we haven't released the original
package is still on npm. I understand this is causing confusion and hope to
release asap

On 20 Jul 2017 23:11, "Jason Aller" notifications@github.com wrote:

Ensure that the name vue-test-utils is available on npm. Either get
https://www.npmjs.com/package/vue-test-utils ->
https://github.com/holmescn/vue-test-utils to hand over the name, or pick
an alternative project name that isn't already claimed to eliminate long
term confusion?

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/vuejs/vue-test-utils/issues/4#issuecomment-316844618,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMlbW9HtwKsMIDGsN5mf5pJy2OXiKF2_ks5sP9B9gaJpZM4NxDwB
.

@eddyerburgh for the typings do you have something in mind other than http://definitelytyped.org/guides/contributing.html for how you want that done?

@jraller Yes I think vue-test-utils should be available on Typings ๐Ÿ‘ . I misunderstood what typings was.

The types are already added, but if there's anything missing please make a PR ๐Ÿ˜„

I just found https://github.com/vuejs/vue-test-utils/tree/master/types and am looking at it now. This renders all of my existing comments rather moot.

Hey hey, any word on publishing?

Hi Austin,

There are a few things holding us up. Evan has been busy lately, and I'm on
vacation at the moment. There are also a couple of issues the need to be
sorted before publishing - mainly how find and findAll work.

On Thu, Aug 10, 2017 at 3:05 PM, Austin notifications@github.com wrote:

Hey hey, any word on publishing?

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/vuejs/vue-test-utils/issues/4#issuecomment-321560884,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMlbW9JjPnTT2t0ItxNpoFX8lh9W7rhSks5sWw4OgaJpZM4NxDwB
.

Sweet, thanks for update and enjoy vacation, i can probably clear some room to knock out this week if there is consensus

The problem is that there is no consensus. Previously it was decided that find should behave in a certain way, but another issue caused me to rethink the decision - https://github.com/vuejs/vue-test-utils/issues/24

We need more feedback on these two issues - https://github.com/vuejs/vue-test-utils/issues/5, https://github.com/vuejs/vue-test-utils/issues/27

Just checking in since it's bit a little over a month, any updates on publishing?

Evan's reviewing the code this week and we're planning to publish a beta on npm

The todos are complete, and beta is released ๐Ÿš€

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexanderstudte picture alexanderstudte  ยท  3Comments

yoyoys picture yoyoys  ยท  3Comments

vwxyutarooo picture vwxyutarooo  ยท  3Comments

vilarinholeo picture vilarinholeo  ยท  3Comments

maerteijn picture maerteijn  ยท  3Comments