1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-18 09:35:20 +02:00
joplin/packages/app-mobile/components/screens/ConfigScreen/plugins/testUtils/newRepoApi.ts

12 lines
416 B
TypeScript
Raw Normal View History

import RepositoryApi, { InstallMode } from '@joplin/lib/services/plugins/RepositoryApi';
import { createTempDir, supportDir } from '@joplin/lib/testing/test-utils';
const newRepoApi = async (installMode: InstallMode): Promise<RepositoryApi> => {
const repo = new RepositoryApi(`${supportDir}/pluginRepo`, await createTempDir(), installMode);
await repo.initialize();
return repo;
};
export default newRepoApi;