()
| 81 | } |
| 82 | |
| 83 | export async function ensureEditorServicesIsConnected(): Promise<IPowerShellExtensionClient> { |
| 84 | const extension = await ensureExtensionIsActivated(); |
| 85 | const sessionId = extension.registerExternalExtension(extensionId); |
| 86 | await extension.waitUntilStarted(sessionId); |
| 87 | extension.unregisterExternalExtension(sessionId); |
| 88 | return extension; |
| 89 | } |
| 90 | |
| 91 | /** |
| 92 | * This is a workaround for sinon not being able to stub interfaces. Interfaces are a TypeScript-only concept so this effectively allows us to stub interfaces by not providing the entire implementation but only what matters for the test. "What matters" is not type checked so you must be careful to stub everything you need, otherwise you should provide a default implementation instead if you do not know. |
no test coverage detected