mirror of
https://github.com/immich-app/immich.git
synced 2024-11-24 08:52:28 +02:00
034c928d9e
* feat(server): remove inactive sessions * add rudimentary unit test --------- Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
14 lines
381 B
TypeScript
14 lines
381 B
TypeScript
import { ISessionRepository } from 'src/interfaces/session.interface';
|
|
import { Mocked, vitest } from 'vitest';
|
|
|
|
export const newSessionRepositoryMock = (): Mocked<ISessionRepository> => {
|
|
return {
|
|
search: vitest.fn(),
|
|
create: vitest.fn() as any,
|
|
update: vitest.fn() as any,
|
|
delete: vitest.fn(),
|
|
getByToken: vitest.fn(),
|
|
getByUserId: vitest.fn(),
|
|
};
|
|
};
|