Files
Agent-System/web/src/hooks/useSendMessage.test.ts
T
weichen 143ee934b8 feat(collab): free-lane chat, claim-on-view, lease ownership, notify inbox
Open member free-lane for chat initiation; auto-claim on author view;
harden lease persist/ownership with readable DOC_BUSY; add notification
inbox and supplement-impact HTTP decision APIs wired to composition root.
2026-09-24 11:49:43 +00:00

17 lines
824 B
TypeScript

import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import test from 'node:test';
test('sending a message lives in one hook', () => {
const app = readFileSync(new URL('../App.tsx', import.meta.url), 'utf8');
const hook = readFileSync(new URL('./useSendMessage.ts', import.meta.url), 'utf8');
assert.equal((app.match(/useSendMessage\(/g) || []).length, 1);
assert.equal(app.includes('附件服务端注册失败'), false);
assert.equal(hook.includes('registerUploadAttachments'), true);
assert.equal(hook.includes('hasDocumentWriteIntent'), true);
assert.equal(hook.includes('runTaskAttempt'), true);
assert.equal(hook.includes('runStreamAttempt'), true);
assert.equal(hook.includes('写意图失败硬拦'), true);
assert.equal(hook.includes('handlePassReview'), true);
});