(expected: ResolvedActiveBackend)
| 4 | import { I18nKey } from "#/i18n/declaration"; |
| 5 | |
| 6 | export function assertActiveEnvironment(expected: ResolvedActiveBackend): void { |
| 7 | const current = getActiveBackend(); |
| 8 | if ( |
| 9 | expected.backend.id !== current.backend.id || |
| 10 | expected.backend.connectionRevision !== |
| 11 | current.backend.connectionRevision || |
| 12 | expected.orgId !== current.orgId |
| 13 | ) { |
| 14 | throw new Error(i18n.t(I18nKey.CONVERSATION$START_ENVIRONMENT_CHANGED)); |
| 15 | } |
| 16 | } |
no test coverage detected