mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
21 lines
740 B
TypeScript
21 lines
740 B
TypeScript
import { PassthroughConverter } from '../../../../src/storage/conversion/PassthroughConverter';
|
|
|
|
describe('A PassthroughConverter', (): void => {
|
|
const representation = {};
|
|
const args = { representation } as any;
|
|
|
|
const converter = new PassthroughConverter();
|
|
|
|
it('supports any conversion.', async(): Promise<void> => {
|
|
await expect(converter.canHandle(args)).resolves.toBeUndefined();
|
|
});
|
|
|
|
it('returns the original representation on handle.', async(): Promise<void> => {
|
|
await expect(converter.handle(args)).resolves.toBe(representation);
|
|
});
|
|
|
|
it('returns the original representation on handleSafe.', async(): Promise<void> => {
|
|
await expect(converter.handleSafe(args)).resolves.toBe(representation);
|
|
});
|
|
});
|