Add analysis pipeline
This commit is contained in:
1 parent
256d776131
commit
770c198ccd
20 files changed
+2572
-1
No files matched your search
@@ -1,11 +1,14 @@
|
||||
import { getQueueToken } from '@nestjs/bullmq';
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { INestApplication } from '@nestjs/common';
|
||||
import request from 'supertest';
|
||||
import { App } from 'supertest/types';
|
||||
import { configureApp } from './../src/app.setup';
|
||||
import { AppModule } from './../src/app.module';
|
||||
import { ANALYSIS_QUEUE_NAME } from './../src/modules/analysis/analysis.constants';
|
||||
import { ConnectionService } from './../src/modules/global/database/connection.service';
|
||||
import { REDIS_CLIENT } from './../src/modules/global/redis/redis.constants';
|
||||
import { SecretService } from './../src/modules/global/secret/secret.service';
|
||||
|
||||
describe('AppController (e2e)', () => {
|
||||
let app: INestApplication<App>;
|
||||
@@ -16,11 +19,25 @@ describe('AppController (e2e)', () => {
|
||||
})
|
||||
.overrideProvider(ConnectionService)
|
||||
.useValue({})
|
||||
.overrideProvider(SecretService)
|
||||
.useValue({
|
||||
get: jest.fn((key: string) => {
|
||||
if (key === 'REDIS_URL') {
|
||||
return Promise.resolve('redis://localhost:6379/0');
|
||||
}
|
||||
return Promise.resolve('');
|
||||
}),
|
||||
ready: jest.fn().mockResolvedValue(undefined),
|
||||
})
|
||||
.overrideProvider(REDIS_CLIENT)
|
||||
.useValue({
|
||||
destroy: jest.fn(),
|
||||
quit: jest.fn().mockResolvedValue(undefined),
|
||||
})
|
||||
.overrideProvider(getQueueToken(ANALYSIS_QUEUE_NAME))
|
||||
.useValue({
|
||||
add: jest.fn(),
|
||||
})
|
||||
.compile();
|
||||
|
||||
app = moduleFixture.createNestApplication();
|
||||
|
||||
Reference in new issue
Block a user