Skip to content

Commit

Permalink
fix: Prefer all inputs equally when generating quads
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimvh committed Nov 8, 2021
1 parent ed287ff commit c6544fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/storage/conversion/RdfToQuadConverter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
6 changes: 3 additions & 3 deletions test/unit/storage/conversion/RdfToQuadConverter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}
});

Expand Down

0 comments on commit c6544fa

Please sign in to comment.