CommunitySolidServer/test/unit/server/description/RootStorageLocationStrategy.test.ts
Joachim Van Herwegen 23db528472 fix: Replace inefficient storage detection
This replaces the recursive backend calls to find the storage
by a new class that is aware what the storage URLs look like.
2023-04-19 09:47:47 +02:00

11 lines
425 B
TypeScript

import { RootStorageLocationStrategy } from '../../../../src/server/description/RootStorageLocationStrategy';
describe('A RootStorageLocationStrategy', (): void => {
const baseUrl = 'http://example.com/';
const strategy = new RootStorageLocationStrategy(baseUrl);
it('returns the base URL.', async(): Promise<void> => {
await expect(strategy.getStorageIdentifier()).resolves.toEqual({ path: baseUrl });
});
});