// 已读取AGENTS.md import * as fs from 'fs'; import * as path from 'path'; /** * 第五十三批回归闸门:分销团队/返佣明细不得用硬编码假数据 */ describe('第五十三批分销数据真实性闸门', () => { const rootDir = path.resolve(__dirname, '../../'); const repoCode = fs.readFileSync(path.join(rootDir, 'server/src/db/repository.ts'), 'utf-8'); it('不得再返回硬编码团队成员/返佣记录', () => { expect(repoCode).not.toContain("'晨曦微风'"); expect(repoCode).not.toContain("'峡谷追风少年'"); expect(repoCode).not.toContain("'dst_101'"); expect(repoCode).not.toContain("'星空漫步者'"); }); it('无真实数据时返回空', () => { const start = repoCode.indexOf('async getDistributionRecords('); const block = repoCode.slice(start, start + 900); expect(block).toContain('return [];'); }); });