mirror of
https://github.com/certd/certd.git
synced 2026-07-06 03:47:34 +08:00
chore: 清理无用测试文件并更新配置与文档
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
import { createHttpRequest } from "@midwayjs/mock";
|
||||
import { Application } from "@midwayjs/koa";
|
||||
import assert from "assert";
|
||||
import { getApp } from "../setup.js";
|
||||
|
||||
describe("test/controller/home.test.ts", () => {
|
||||
it("should POST /api/get_user", async function (this: any) {
|
||||
const app: Application = getApp();
|
||||
// make request
|
||||
const result = await createHttpRequest(app).get("/api/get_user").query({ uid: 123 });
|
||||
|
||||
// use expect by jest
|
||||
assert(result.status === 200);
|
||||
assert(result.body.message === "OK");
|
||||
});
|
||||
});
|
||||
@@ -1,16 +0,0 @@
|
||||
import { createHttpRequest } from "@midwayjs/mock";
|
||||
import { Application } from "@midwayjs/koa";
|
||||
import assert from "assert";
|
||||
import { getApp } from "../setup.js";
|
||||
|
||||
describe("test/controller/home.test.ts", () => {
|
||||
it("should GET /", async () => {
|
||||
const app: Application = getApp();
|
||||
// make request
|
||||
const result = await createHttpRequest(app).get("/");
|
||||
|
||||
// use expect by jest
|
||||
assert(result.status === 200);
|
||||
assert(result.text === "Hello Midwayjs!");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user