mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00

This adds options for enabling setup to the config folder. All default configs with permanent storage (file/sparql) are configured to require setup at server start. Memory-based configs merely have it as an option.
19 lines
669 B
TypeScript
19 lines
669 B
TypeScript
import { StaticHandler } from '../../../../src/util/handlers/StaticHandler';
|
|
|
|
describe('A StaticHandler', (): void => {
|
|
it('can handle everything.', async(): Promise<void> => {
|
|
const handler = new StaticHandler();
|
|
await expect(handler.canHandle(null)).resolves.toBeUndefined();
|
|
});
|
|
|
|
it('returns the stored value.', async(): Promise<void> => {
|
|
const handler = new StaticHandler('apple');
|
|
await expect(handler.handle()).resolves.toEqual('apple');
|
|
});
|
|
|
|
it('returns undefined if there is no stored value.', async(): Promise<void> => {
|
|
const handler = new StaticHandler();
|
|
await expect(handler.handle()).resolves.toBeUndefined();
|
|
});
|
|
});
|