-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dcb99fc
commit 34417bd
Showing
9 changed files
with
76 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
import { FilesRouter } from './files.router.js'; | ||
import { type FilesController } from '../controllers/files.controller.js'; | ||
import { type AuthInterceptor } from '../middleware/auth.interceptor.js'; | ||
import { type FilesInterceptor } from '../middleware/files.interceptor.js'; | ||
import { FilesRouter } from './files.router.js'; | ||
|
||
describe('Given a instance of the class FilesRouter', () => { | ||
describe('Given an instance of the class FilesRouter', () => { | ||
const controller = { | ||
fileHandler: jest.fn(), | ||
} as unknown as FilesController; | ||
|
||
const interceptor = { | ||
singleFile: jest.fn().mockReturnValue(jest.fn()), | ||
upload: jest.fn(), | ||
singleFile: jest.fn(() => jest.fn()), | ||
cloudUpload: jest.fn(), | ||
} as unknown as FilesInterceptor; | ||
|
||
const router = new FilesRouter(controller, interceptor); | ||
test('Then it should be instance of the class', () => { | ||
|
||
test('Then it should be an instance of the class', () => { | ||
expect(router).toBeInstanceOf(FilesRouter); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters