()
| 15 | } |
| 16 | |
| 17 | function oauthWebSocketBaseUrl(): string { |
| 18 | const baseUrl = oauthBaseApiUrl() |
| 19 | if (baseUrl.startsWith('https://')) { |
| 20 | return `wss://${baseUrl.slice('https://'.length)}` |
| 21 | } |
| 22 | if (baseUrl.startsWith('http://')) { |
| 23 | return `ws://${baseUrl.slice('http://'.length)}` |
| 24 | } |
| 25 | return baseUrl |
| 26 | } |
| 27 | |
| 28 | function resetEnv() { |
| 29 | delete process.env.NOUMENA_PLATFORM_BASE_URL |
no test coverage detected