Skip to content

Commit

Permalink
ALCS-1858 test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fbarreta committed Dec 12, 2024
1 parent e1bba2e commit 8442fbb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { AutomapperModule } from 'automapper-nestjs';
import { createMock, DeepMocked } from '@golevelup/nestjs-testing';
import { Test, TestingModule } from '@nestjs/testing';
import { getRepositoryToken } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { DataSource, Repository } from 'typeorm';
import {
initApplicationDecisionMock,
initApplicationMockEntity,
Expand Down Expand Up @@ -59,6 +59,7 @@ describe('ApplicationDecisionV2Service', () => {
let mockDecisionConditionService: DeepMocked<ApplicationDecisionConditionService>;
let mockNaruSubtypeRepository: DeepMocked<Repository<NaruSubtype>>;
let mockApplicationSubmissionStatusService: DeepMocked<ApplicationSubmissionStatusService>;
let mockdataSource: DeepMocked<DataSource>;

let mockApplication;
let mockDecision;
Expand All @@ -80,6 +81,8 @@ describe('ApplicationDecisionV2Service', () => {
mockDecisionConditionService = createMock();
mockNaruSubtypeRepository = createMock();
mockApplicationSubmissionStatusService = createMock();
mockdataSource = createMock();


const module: TestingModule = await Test.createTestingModule({
imports: [
Expand Down Expand Up @@ -141,6 +144,10 @@ describe('ApplicationDecisionV2Service', () => {
provide: ApplicationSubmissionStatusService,
useValue: mockApplicationSubmissionStatusService,
},
{
provide: DataSource,
useValue: mockdataSource,
},
],
}).compile();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { AutomapperModule } from 'automapper-nestjs';
import { createMock, DeepMocked } from '@golevelup/nestjs-testing';
import { Test, TestingModule } from '@nestjs/testing';
import { getRepositoryToken } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { Repository, DataSource } from 'typeorm';
import { DocumentService } from '../../../document/document.service';
import { NOI_SUBMISSION_STATUS } from '../../notice-of-intent/notice-of-intent-submission-status/notice-of-intent-status.dto';
import { NoticeOfIntentSubmissionStatusService } from '../../notice-of-intent/notice-of-intent-submission-status/notice-of-intent-submission-status.service';
Expand Down Expand Up @@ -46,6 +46,7 @@ describe('NoticeOfIntentDecisionV2Service', () => {
let mockDecisionComponentService: DeepMocked<NoticeOfIntentDecisionComponentService>;
let mockDecisionConditionService: DeepMocked<NoticeOfIntentDecisionConditionService>;
let mockNoticeOfIntentSubmissionStatusService: DeepMocked<NoticeOfIntentSubmissionStatusService>;
let mockdataSource: DeepMocked<DataSource>;

let mockNoticeOfIntent;
let mockDecision;
Expand All @@ -62,6 +63,7 @@ describe('NoticeOfIntentDecisionV2Service', () => {
mockDecisionComponentService = createMock();
mockDecisionConditionService = createMock();
mockNoticeOfIntentSubmissionStatusService = createMock();
mockdataSource = createMock();

const module: TestingModule = await Test.createTestingModule({
imports: [
Expand Down Expand Up @@ -111,6 +113,10 @@ describe('NoticeOfIntentDecisionV2Service', () => {
provide: NoticeOfIntentSubmissionStatusService,
useValue: mockNoticeOfIntentSubmissionStatusService,
},
{
provide: DataSource,
useValue: mockdataSource,
},
],
}).compile();

Expand Down

0 comments on commit 8442fbb

Please sign in to comment.