fix watcher await

This commit is contained in:
Jonathan Jogenfors
2024-03-01 00:57:28 +01:00
parent e1872951e2
commit 298215a76a
4 changed files with 6 additions and 6 deletions

View File

@@ -11,7 +11,7 @@ interface MockWatcherOptions {
| StorageEventType.ERROR;
value: string;
}>;
close?: () => void;
close?: () => Promise<void>;
}
export const makeMockWatcher =
@@ -37,7 +37,7 @@ export const makeMockWatcher =
}
}
}
return () => close?.();
return async () => await close?.();
};
export const newStorageRepositoryMock = (reset = true): jest.Mocked<IStorageRepository> => {