mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: Determine Typed Converter output based on input type
This commit is contained in:
@@ -6,7 +6,7 @@ import {
|
||||
getTypeWeight,
|
||||
getWeightedPreferences, isInternalContentType,
|
||||
matchesMediaPreferences,
|
||||
matchesMediaType,
|
||||
matchesMediaType, preferencesToString,
|
||||
} from '../../../../src/storage/conversion/ConversionUtil';
|
||||
import { InternalServerError } from '../../../../src/util/errors/InternalServerError';
|
||||
|
||||
@@ -153,4 +153,11 @@ describe('ConversionUtil', (): void => {
|
||||
expect(isInternalContentType('text/turtle')).toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
||||
describe('#preferencesToString', (): void => {
|
||||
it('returns a string serialization.', async(): Promise<void> => {
|
||||
const preferences: ValuePreferences = { 'a/*': 1, 'b/b': 0.8, 'c/c': 0 };
|
||||
expect(preferencesToString(preferences)).toEqual('a/*:1,b/b:0.8,c/c:0');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user