mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: Prefer all inputs equally when generating quads
This commit is contained in:
parent
ed287ffade
commit
c6544fac1d
@ -13,7 +13,7 @@ import type { RepresentationConverterArgs } from './RepresentationConverter';
|
||||
*/
|
||||
export class RdfToQuadConverter extends BaseTypedRepresentationConverter {
|
||||
public constructor() {
|
||||
super(rdfParser.getContentTypesPrioritized(), INTERNAL_QUADS);
|
||||
super(rdfParser.getContentTypes(), INTERNAL_QUADS);
|
||||
}
|
||||
|
||||
public async handle({ representation, identifier }: RepresentationConverterArgs): Promise<Representation> {
|
||||
|
@ -17,9 +17,9 @@ describe('A RdfToQuadConverter', (): void => {
|
||||
const identifier: ResourceIdentifier = { path: 'path' };
|
||||
|
||||
it('supports serializing as quads.', async(): Promise<void> => {
|
||||
const types = Object.entries(await rdfParser.getContentTypesPrioritized());
|
||||
for (const [ type, weight ] of types) {
|
||||
await expect(converter.getOutputTypes(type)).resolves.toEqual({ [INTERNAL_QUADS]: weight });
|
||||
const types = await rdfParser.getContentTypes();
|
||||
for (const type of types) {
|
||||
await expect(converter.getOutputTypes(type)).resolves.toEqual({ [INTERNAL_QUADS]: 1 });
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user