Files
SnowLuma/packages/onebot/tests/status-health.test.ts
T
DrSmoothl 870e9a5fbc fix(bridge): recover stale outbound sessions
Recover invalidated native send bindings from same-account receive evidence. Track outbound connection loss in status health and refresh the six public native artifacts from native build 94f2b63.

Closes #342
2026-08-09 21:40:09 +08:00

19 lines
607 B
TypeScript

import { describe, expect, it } from 'vitest';
import { ApiHandler, type ApiActionContext } from '../src/api-handler';
describe('get_status transport health (#233, #342)', () => {
it('keeps online true while reporting a stalled receive path as not good', async () => {
const ctx = {
isOnline: () => true,
bridge: { receiveHealthy: false },
} as unknown as ApiActionContext;
const response = await new ApiHandler(ctx).handle('get_status', {});
expect(response).toMatchObject({
status: 'ok',
retcode: 0,
data: { online: true, good: false },
});
});
});