Files
orca/mobile/src/components/StatusDot.test.ts
T
Jinwoo Hong 0e0a8c943b fix(mobile): recover Relay connections after resume (#16498)
* fix(mobile): recover relay sessions on resume

* fix(mobile): expedite relay retry on app resume

* fix(mobile): keep relay reconnect controller under lint limit

* fix(mobile): rebuild relay client after pairing rejection

* refactor(mobile): keep relay reconnect policy under lint limit
2026-08-25 16:25:00 -07:00

24 lines
684 B
TypeScript

import { describe, expect, it, vi } from 'vitest'
vi.mock('react-native', () => ({
StyleSheet: { create: <T>(styles: T) => styles },
View: 'View'
}))
import { colors } from '../theme/mobile-theme'
import { statusDotColor } from './StatusDot'
describe('statusDotColor', () => {
it('keeps Relay progress amber when the raw state is disconnected', () => {
expect(statusDotColor('disconnected', { kind: 'normal', label: 'Connecting via Relay…' })).toBe(
colors.statusAmber
)
})
it('keeps an idle disconnected host gray', () => {
expect(statusDotColor('disconnected', { kind: 'normal', label: 'Disconnected' })).toBe(
colors.textMuted
)
})
})