mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: Integrate setup behaviour
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.
This commit is contained in:
18
test/unit/util/handlers/StaticHandler.test.ts
Normal file
18
test/unit/util/handlers/StaticHandler.test.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
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();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user