Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
LinboLen committed Jul 8, 2024
1 parent d6f3caf commit 7fa589c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/polymorphic-relationships/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default {
transform: {
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }],
},
forceExit: true,
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: '../../coverage/apps/polymorphic-relationships',
};
6 changes: 6 additions & 0 deletions apps/polymorphic-relationships/src/app/app.controller.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Test, TestingModule } from '@nestjs/testing';

import { AppController } from './app.controller';
import { FedacoModule } from '@gradii/nest-fedaco';
import { db } from '@gradii/fedaco';

describe('AppController', () => {
let app: TestingModule;
Expand All @@ -23,8 +24,13 @@ describe('AppController', () => {
}).compile();
});

afterAll(async ()=>{
await db().disconnect()
})

it('getData', async () => {
const controller = app.get(AppController);
await controller.initTable();
await controller.addPost();
await controller.createPostImage();
const { list } = await controller.getImages();
Expand Down

0 comments on commit 7fa589c

Please sign in to comment.