feat: 拓展中心加入机器人

This commit is contained in:
Wxw-Gu committed 2026-11-18 11:22:39 +08:00
1 parent 4eaddc2d75
commit a81b3733fa
31 files changed
+3510 -566

No files matched your search

+3 -2
View File
@@ -39,18 +39,19 @@ function stageExamples(): { sourceRoot: string; lockFile: string } {
}
describe('官方模板构建', () => {
it('产出两个模板与索引,索引指向真实文件', () => {
it('产出三个模板与索引,索引指向真实文件', () => {
const { sourceRoot, lockFile } = stageExamples()
const outputDir = path.join(tempRoot(), 'out')
const result = buildTemplates({ sourceRoot, outputDir, lockFile })
expect(result.templates.map((item) => item.templateId).sort()).toEqual([
'douyin-sender',
'group-chat-bot',
'keyword-bot'
])
const index = fs.readJsonSync(path.join(outputDir, 'index.json'))
expect(index.version).toBe(1)
expect(index.templates).toHaveLength(2)
expect(index.templates).toHaveLength(3)
for (const template of index.templates) {
expect(fs.existsSync(path.join(outputDir, template.file))).toBe(true)
expect(template.sha256).toMatch(/^[a-f0-9]{64}$/)