This commit is contained in:
Thomas Dupont
2022-05-16 10:58:56 +02:00
committed by Joachim Van Herwegen
parent 5989a1fdc5
commit afed963a23
3 changed files with 11 additions and 6 deletions

View File

@@ -6,16 +6,17 @@ import { PreferenceSupport } from '../../../../src/storage/routing/PreferenceSup
import { BadRequestHttpError } from '../../../../src/util/errors/BadRequestHttpError';
describe('A PreferenceSupport', (): void => {
const type = 'internal/quads';
const preferences: RepresentationPreferences = { type: { [type]: 1 }};
let preferences: RepresentationPreferences;
let converter: RepresentationConverter;
let support: PreferenceSupport;
const type = 'internal/quads';
const identifier: ResourceIdentifier = 'identifier' as any;
const representation: Representation = 'representation' as any;
beforeEach(async(): Promise<void> => {
preferences = { type: { [type]: 1 }};
converter = { canHandle: jest.fn() } as any;
support = new PreferenceSupport(type, converter);
support = new PreferenceSupport(preferences, converter);
});
it('returns true if the converter supports the input.', async(): Promise<void> => {