generated from UK-Export-Finance/nestjs-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(DTFS2-7052): refactor api tests to match TFS and solve type issues
- Loading branch information
Showing
12 changed files
with
166 additions
and
280 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,19 @@ | ||
import { INestApplication } from '@nestjs/common'; | ||
|
||
import { Api } from './api'; | ||
import { CreateApp } from './createApp'; | ||
import { Api } from '@ukef-test/support/api'; | ||
|
||
describe('AppController (e2e)', () => { | ||
let app: INestApplication; | ||
let api; | ||
|
||
beforeAll(async () => { | ||
app = await new CreateApp().init(); | ||
api = new Api(app.getHttpServer()); | ||
api = await Api.create(); | ||
}); | ||
|
||
afterAll(async () => { | ||
await api.destroy(); | ||
}); | ||
|
||
it(`GET /ready`, async () => { | ||
const { status } = await api.get('/ready'); | ||
const { status } = await api.get('/api/v1/ready'); | ||
|
||
expect(status).toBe(200); | ||
}); | ||
|
||
afterAll(async () => { | ||
await app.close(); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.