gitlab_monitor/test/ci.test.ts
zhaoyingbo 50121dc073
All checks were successful
CI Monitor MIflow / build-image (push) Successful in 1m56s
feat: 添加Test
2024-08-09 01:42:46 +00:00

13 lines
393 B
TypeScript

import { expect, test } from "bun:test"
import { manageCIMonitorReq } from "../routes/ci"
import netTool from "../service/netTool"
test("manageCIMonitorReq", async () => {
const req = new Request(
"https://ci-monitor.xiaomiwh.cn/gitlab/ci?chat_id=oc_8c789ce8f4ecc6695bb63ca6ec4c61ea"
)
const res = await manageCIMonitorReq(req)
expect(res).toEqual(netTool.ok("reporting..."))
})