Skip to content

Commit

Permalink
Add file storage client mock
Browse files Browse the repository at this point in the history
  • Loading branch information
bischofmax committed Oct 25, 2023
1 parent 4c0706c commit 8827c59
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { createMock } from '@golevelup/ts-jest';
import { Configuration } from '@hpi-schul-cloud/commons/lib';
import { IConfig } from '@hpi-schul-cloud/commons/lib/interfaces/IConfig';
import { EntityManager } from '@mikro-orm/mongodb';
Expand All @@ -13,6 +14,7 @@ import {
taskFactory,
userFactory,
} from '@shared/testing';
import { FilesStorageClientAdapterService } from '@src/modules/files-storage-client';
import { Request } from 'express';
import request from 'supertest';

Expand Down Expand Up @@ -44,6 +46,8 @@ describe('Task copy (API)', () => {
return true;
},
})
.overrideProvider(FilesStorageClientAdapterService)
.useValue(createMock<FilesStorageClientAdapterService>())
.compile();

app = moduleFixture.createNestApplication();
Expand Down

0 comments on commit 8827c59

Please sign in to comment.