mirror of
https://github.com/immich-app/immich.git
synced 2024-12-28 22:51:59 +00:00
034c928d9e
* feat(server): remove inactive sessions * add rudimentary unit test --------- Co-authored-by: Daniel Dietzler <mail@ddietzler.dev>
13 lines
381 B
TypeScript
13 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(),
|
|
};
|
|
};
|