mirror of
https://wget.la/https://github.com/Wxw-Gu/WechatExplorer
synced 2026-12-01 17:25:15 +08:00
feat: 扩展中心支持多模态消息、HTML 渲染、一级导航与应用内通知
This commit is contained in:
1 parent
b20e514c90
commit
4ea73c3414
63 files changed
+8360
-644
No files matched your search
@@ -39,7 +39,7 @@ 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 })
|
||||
@@ -47,11 +47,12 @@ describe('官方模板构建', () => {
|
||||
expect(result.templates.map((item) => item.templateId).sort()).toEqual([
|
||||
'douyin-sender',
|
||||
'group-chat-bot',
|
||||
'keyword-bot'
|
||||
'keyword-bot',
|
||||
'morning-digest'
|
||||
])
|
||||
const index = fs.readJsonSync(path.join(outputDir, 'index.json'))
|
||||
expect(index.version).toBe(1)
|
||||
expect(index.templates).toHaveLength(3)
|
||||
expect(index.templates).toHaveLength(4)
|
||||
for (const template of index.templates) {
|
||||
expect(fs.existsSync(path.join(outputDir, template.file))).toBe(true)
|
||||
expect(template.sha256).toMatch(/^[a-f0-9]{64}$/)
|
||||
|
||||
Reference in new issue
Block a user