laf/server/test/app.e2e-spec.ts
Maslow 098e58d712
Clean-v0.8-codes (#403)
* clean old version codes

Signed-off-by: maslow <wangfugen@126.com>

* remove old codes & refactor dir struct

* merge next-web & move to web

* fix configs

* fix ci

Signed-off-by: maslow <wangfugen@126.com>
2022-11-10 15:35:55 +08:00

25 lines
618 B
TypeScript

import { Test, TestingModule } from '@nestjs/testing'
import { INestApplication } from '@nestjs/common'
import * as request from 'supertest'
import { AppModule } from './../src/app.module'
describe('AppController (e2e)', () => {
let app: INestApplication
beforeEach(async () => {
const moduleFixture: TestingModule = await Test.createTestingModule({
imports: [AppModule],
}).compile()
app = moduleFixture.createNestApplication()
await app.init()
})
it('/ (GET)', () => {
return request(app.getHttpServer())
.get('/')
.expect(200)
.expect('Hello World!')
})
})