( options: MountingOptions<any> & Record<string, any> )
| 50 | ] as const |
| 51 | |
| 52 | function 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 |
| 72 | export function createInstance( |
no outgoing calls
no test coverage detected
searching dependent graphs…