MCPcopy Create free account
hub / github.com/vuejs/test-utils / getInstanceOptions

Function getInstanceOptions

src/createInstance.ts:52–69  ·  view source on GitHub ↗
(
  options: MountingOptions<any> & Record<string, any>
)

Source from the content-addressed store, hash-verified

50] as const
51
52function getInstanceOptions(
53 options: MountingOptions<any> & Record<string, any>
54): Record<string, any> {
55 if (options.methods) {
56 console.warn(
57 "Passing a `methods` option to mount was deprecated on Vue Test Utils v1, and it won't have any effect on v2. For additional info: https://vue-test-utils.vuejs.org/upgrading-to-v1/#setmethods-and-mountingoptions-methods"
58 )
59 delete options.methods
60 }
61
62 const resultOptions = { ...options }
63 for (const key of Object.keys(options)) {
64 if (MOUNT_OPTIONS.includes(key as keyof MountingOptions<any>)) {
65 delete resultOptions[key]
66 }
67 }
68 return resultOptions
69}
70
71// implementation
72export function createInstance(

Callers 1

createInstanceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…