mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix: lint
This commit is contained in:
parent
ea207d705c
commit
b88da7b82e
1 changed files with 6 additions and 4 deletions
|
|
@ -25,12 +25,14 @@ describe(UserAdminService.name, () => {
|
|||
it('should set latestSession for each user', async () => {
|
||||
const { user1, admin } = userStub;
|
||||
const users = [admin, user1];
|
||||
// Session型にuserIdを含める
|
||||
const session = { ...factory.session(), userId: user1.id };
|
||||
mocks.user.getList.mockResolvedValue(users);
|
||||
mocks.session.getLatestByUserId.mockImplementation(async (userId) => {
|
||||
if (userId === user1.id) return session;
|
||||
return undefined;
|
||||
mocks.session.getLatestByUserId.mockImplementation((userId) => {
|
||||
if (userId === user1.id) {
|
||||
return Promise.resolve(session);
|
||||
}
|
||||
// eslint-disable-next-line unicorn/no-useless-undefined
|
||||
return Promise.resolve(undefined);
|
||||
});
|
||||
const mapSessionSpy = vitest.spyOn(sessionDto, 'mapSession');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue