78 lines
3.0 KiB
Markdown
78 lines
3.0 KiB
Markdown
# 测试结果
|
|
|
|
- 时间: 20260410-164555
|
|
- 范围: mirror
|
|
- 文件: test/app/service/systems/notice.test.js
|
|
- 状态: fail
|
|
- 退出码: 1
|
|
|
|
## 标准输出
|
|
|
|
```text
|
|
[egg-ts-helper] create typings\app\extend\application.d.ts (2ms)
|
|
[egg-ts-helper] create typings\app\controller\index.d.ts (2ms)
|
|
[egg-ts-helper] create typings\app\model\index.d.ts (3ms)
|
|
[egg-ts-helper] create typings\config\index.d.ts (12ms)
|
|
[egg-ts-helper] create typings\config\plugin.d.ts (1ms)
|
|
[egg-ts-helper] create typings\app\service\index.d.ts (3ms)
|
|
[egg-ts-helper] create typings\app\index.d.ts (0ms)
|
|
|
|
|
|
test/app/service/systems/notice.test.js
|
|
1) should normalize payload and send only matching webhooks
|
|
鉁?should enrich payload with store info from cache before querying database
|
|
鉁?should load store info from database and cache it when cache is empty
|
|
鉁?should send to both warehouse and owner webhooks when events match or are set to all
|
|
鉁?should only send up to the configured webhook limit
|
|
鉁?should require url for image or file message
|
|
鉁?should require warehouseId but allow empty ownerId
|
|
鉁?should retry failed webhooks three times and persist final failures
|
|
鉁?should reject sending unregistered event
|
|
鉁?should reject dotted or numeric-leading event names
|
|
鉁?should send wecom webhook as enterprise wechat direct message
|
|
鉁?should expose available webhook events and reject unsupported ones
|
|
|
|
|
|
11 passing (12ms)
|
|
1 failing
|
|
|
|
1) test/app/service/systems/notice.test.js
|
|
should normalize payload and send only matching webhooks:
|
|
|
|
AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:
|
|
+ actual - expected
|
|
|
|
+ 100000
|
|
- 1000000
|
|
|
|
+ expected - actual
|
|
|
|
-100000
|
|
+1000000
|
|
|
|
at Object.findAll (test\app\service\systems\notice.test.js:34:20)
|
|
at D:\wms\worktrees\deploy-20260409155126\app\service\systems\notice\index.js:796:43
|
|
at Array.map (<anonymous>)
|
|
at NoticeService.findMatchedWebhooks (app\service\systems\notice\index.js:786:62)
|
|
at NoticeService.send (app\service\systems\notice\index.js:826:33)
|
|
at async Context.<anonymous> (test\app\service\systems\notice.test.js:55:20)
|
|
|
|
|
|
|
|
[mochawesome] Report JSON saved to D:\wms\worktrees\deploy-20260409155126\node_modules\.mochawesome-reports\mochawesome.json
|
|
|
|
[mochawesome] Report HTML saved to D:\wms\worktrees\deploy-20260409155126\node_modules\.mochawesome-reports\mochawesome.html
|
|
```
|
|
|
|
## 标准错误
|
|
|
|
```text
|
|
ForkError: D:\wms\node_modules\mocha\bin\_mocha --exit --timeout=60000 --reporter=D:\wms\node_modules\mochawesome-with-mocha\src\mochawesome.js --reporter-options=reportDir=node_modules/.mochawesome-reports --require=D:\wms\node_modules\egg-mock\register.js test/app/service/systems/notice.test.js exit with code 1
|
|
at ChildProcess.<anonymous> (D:\wms\node_modules\egg-bin\dist\cmd\base.js:98:33)
|
|
at Object.onceWrapper (node:events:623:26)
|
|
at ChildProcess.emit (node:events:508:28)
|
|
at ChildProcess._handle.onexit (node:internal/child_process:294:12) {
|
|
code: 1
|
|
}
|
|
```
|