mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: add template based data generator
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import fs from 'fs';
|
||||
import { ExtensionBasedMapper } from '../../../../src/storage/mapping/ExtensionBasedMapper';
|
||||
import {
|
||||
ExtensionBasedMapper,
|
||||
ExtensionBasedMapperFactory,
|
||||
} from '../../../../src/storage/mapping/ExtensionBasedMapper';
|
||||
import { BadRequestHttpError } from '../../../../src/util/errors/BadRequestHttpError';
|
||||
import { NotFoundHttpError } from '../../../../src/util/errors/NotFoundHttpError';
|
||||
import { trimTrailingSlashes } from '../../../../src/util/PathUtil';
|
||||
@@ -135,4 +138,12 @@ describe('An ExtensionBasedMapper', (): void => {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('An ExtensionBasedMapperFactory', (): void => {
|
||||
const factory = new ExtensionBasedMapperFactory();
|
||||
|
||||
it('creates an ExtensionBasedMapper.', async(): Promise<void> => {
|
||||
await expect(factory.create('base', 'filePath')).resolves.toBeInstanceOf(ExtensionBasedMapper);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user