20 lines
769 B
JavaScript
20 lines
769 B
JavaScript
import assert from 'node:assert/strict';
|
|
import { readFile } from 'node:fs/promises';
|
|
import test from 'node:test';
|
|
|
|
const read = (path) => readFile(new URL(path, import.meta.url), 'utf8');
|
|
|
|
test('公司文件在员工端展示摘要、受控原文件入口并继续复用消息ID追问', async () => {
|
|
const [service, detail] = await Promise.all([
|
|
read('../src/services/broadcast.ts'),
|
|
read('../src/pages/user/broadcast/detail.vue')
|
|
]);
|
|
|
|
assert.match(service, /interface BroadcastAttachment/);
|
|
assert.match(service, /downloadUrl: string/);
|
|
assert.match(detail, /公司文件/);
|
|
assert.match(detail, /attachment\.summary/);
|
|
assert.match(detail, /authenticatedFileUrl/);
|
|
assert.match(detail, /saveBroadcastQuestionContext\(item\.value\.id/);
|
|
});
|