(environments: PythonExtension['environments'])
| 38 | return { dispose: () => disposableStore.dispose(), environments }; |
| 39 | } |
| 40 | export function whenKnownEnvironments(environments: PythonExtension['environments']) { |
| 41 | return { |
| 42 | thenReturn: (items: DeepPartial<Environment>[]) => { |
| 43 | items.forEach((item) => { |
| 44 | if (!Array.isArray(item.tools)) { |
| 45 | item.tools = []; |
| 46 | } |
| 47 | }); |
| 48 | when(environments.known).thenReturn(items as any); |
| 49 | } |
| 50 | }; |
| 51 | } |
| 52 | export function whenResolveEnvironment( |
| 53 | environments: PythonExtension['environments'], |
| 54 | environment: Parameters<PythonExtension['environments']['resolveEnvironment']>[0] = anything() |
no test coverage detected