Skip to content

Instantly share code, notes, and snippets.

@voskresla
Created May 26, 2020 21:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save voskresla/285c4c35fe1195c1de0db63cbf06947d to your computer and use it in GitHub Desktop.
Save voskresla/285c4c35fe1195c1de0db63cbf06947d to your computer and use it in GitHub Desktop.
vue-test-utils: improve types for typed wrapper.setProps()
import { VueClass, ThisTypedMountOptions } from '@vue/test-utils'
import Vue from 'vue'
declare module '@vue/test-utils' {
export interface Wrapper<V, P> extends Wrapper<V> {
setProps(props: Partial<P>): void
}
export declare function mount<V extends Vue, P>(component: VueClass<V>, options?: ThisTypedMountOptions<V, P>): Wrapper<V, P>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment