23 lines
705 B
TypeScript
23 lines
705 B
TypeScript
import assert from 'node:assert/strict'
|
|
import test from 'node:test'
|
|
import { formatInventoryTaskDingTalkContent } from '../inventoryService'
|
|
|
|
test('盘点钉钉通知按任务、截止和待办分块展示', () => {
|
|
const content = formatInventoryTaskDingTalkContent({
|
|
title: '盘点测试999',
|
|
deadlineAt: new Date('2026-07-22T08:59:00.000Z'),
|
|
itemCount: 11
|
|
})
|
|
|
|
assert.equal(
|
|
content,
|
|
[
|
|
'**任务:** 盘点测试999',
|
|
'**截止:** 2026年7月22日 16:59',
|
|
'**待办:** 扫描本人名下 11 件资产',
|
|
'未找到或不在本人处,直接标记异常。'
|
|
].join('\n\n')
|
|
)
|
|
assert.doesNotMatch(content, /责任人|部门|操作要求/)
|
|
})
|