MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / whenKnownEnvironments

Function whenKnownEnvironments

src/kernels/helpers.unit.test.ts:40–51  ·  view source on GitHub ↗
(environments: PythonExtension['environments'])

Source from the content-addressed store, hash-verified

38 return { dispose: () => disposableStore.dispose(), environments };
39}
40export 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}
52export function whenResolveEnvironment(
53 environments: PythonExtension['environments'],
54 environment: Parameters<PythonExtension['environments']['resolveEnvironment']>[0] = anything()

Calls 1

forEachMethod · 0.45

Tested by

no test coverage detected