mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
chore(release) publish v5.0.0-beta.0
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import * as express from 'express';
|
||||
import * as request from 'supertest';
|
||||
import { Test } from '@nestjs/testing';
|
||||
import { CatsModule } from '../../src/cats/cats.module';
|
||||
@@ -6,10 +5,8 @@ import { CatsService } from '../../src/cats/cats.service';
|
||||
import { INestApplication } from '@nestjs/common';
|
||||
|
||||
describe('Cats', () => {
|
||||
let server;
|
||||
let app: INestApplication;
|
||||
|
||||
const catsService = { findAll: () => ['test'] };
|
||||
let catsService = { findAll: () => ['test'] };
|
||||
|
||||
beforeAll(async () => {
|
||||
const module = await Test.createTestingModule({
|
||||
@@ -19,13 +16,12 @@ describe('Cats', () => {
|
||||
.useValue(catsService)
|
||||
.compile();
|
||||
|
||||
server = express();
|
||||
app = module.createNestApplication(server);
|
||||
app = module.createNestApplication();
|
||||
await app.init();
|
||||
});
|
||||
|
||||
it(`/GET cats`, () => {
|
||||
return request(server)
|
||||
return request(app.getHttpServer())
|
||||
.get('/cats')
|
||||
.expect(200)
|
||||
.expect({
|
||||
|
||||
Reference in New Issue
Block a user