Skip to content

Commit

Permalink
test(visualizator-be): Add E2E tests using Supertest 🧪
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldev5 authored and dudo50 committed Jul 13, 2024
1 parent b75b4e5 commit 23d27cd
Show file tree
Hide file tree
Showing 5 changed files with 543 additions and 6 deletions.
5 changes: 4 additions & 1 deletion apps/visualizator-be/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"test": "jest --passWithNoTests",
"test:watch": "jest --watch",
"test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand"
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json"
},
"dependencies": {
"@apollo/server": "^4.10.4",
Expand All @@ -45,9 +46,11 @@
"@types/express": "^4.17.21",
"@types/jest": "^29.5.12",
"@types/node": "^20.14.10",
"@types/supertest": "^6.0.2",
"jest": "^29.7.0",
"prettier": "^3.3.2",
"source-map-support": "^0.5.21",
"supertest": "^7.0.0",
"ts-jest": "^29.1.5",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
Expand Down
10 changes: 5 additions & 5 deletions apps/visualizator-be/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import { TypeOrmModule, TypeOrmModuleOptions } from '@nestjs/typeorm';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { GraphQLModule } from '@nestjs/graphql';
import { ApolloDriver, ApolloDriverConfig } from '@nestjs/apollo';
import { MessageModule } from 'src/messages/messages.module';
import { Asset, Message } from 'src/messages/message.entity';
import { Channel } from 'src/channels/channel.entity';
import { ChannelModule } from 'src/channels/channels.module';
import { MessageModule } from '../messages/messages.module';
import { Asset, Message } from '../messages/message.entity';
import { Channel } from '../channels/channel.entity';
import { ChannelModule } from '../channels/channels.module';
import { ScheduleModule } from '@nestjs/schedule';
import { TasksModule } from 'src/tasks/tasks.module';
import { TasksModule } from '../tasks/tasks.module';

const typeOrmConfig = (config: ConfigService): TypeOrmModuleOptions => ({
type: 'postgres',
Expand Down
Loading

0 comments on commit 23d27cd

Please sign in to comment.