mirror of
https://github.com/KevinMidboe/immich.git
synced 2026-02-13 03:39:21 +00:00
refactor(server)*: tsconfigs (#2689)
* refactor(server): tsconfigs * chore: dummy commit * fix: start.sh * chore: restore original entry scripts
This commit is contained in:
10
server/test/repositories/crypto.repository.mock.ts
Normal file
10
server/test/repositories/crypto.repository.mock.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { ICryptoRepository } from '@app/domain';
|
||||
|
||||
export const newCryptoRepositoryMock = (): jest.Mocked<ICryptoRepository> => {
|
||||
return {
|
||||
randomBytes: jest.fn().mockReturnValue(Buffer.from('random-bytes', 'utf8')),
|
||||
compareBcrypt: jest.fn().mockReturnValue(true),
|
||||
hashBcrypt: jest.fn().mockImplementation((input) => Promise.resolve(`${input} (hashed)`)),
|
||||
hashSha256: jest.fn().mockImplementation((input) => `${input} (hashed)`),
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user