web-report/test/server.ts
2023-08-21 23:45:47 +08:00

17 lines
502 B
TypeScript

import {Test} from 'supertest';
import {PORT} from './../service/config'
const request = require("supertest");
// import { createServer } from './../src/core/server'
// import { initRoutes } from './../src/routes'
// 创建应用并初始化路由
// const app = createServer({
// port: PORT
// }, () => console.log('server created'))
// initRoutes(app)
export const createRequest = () => request(`http://localhost:${PORT}`)
export const get = (path: string): Test => createRequest().get(path)