refactor: Streamline RepresentationMetadata interface

This commit is contained in:
Joachim Van Herwegen
2020-09-08 09:43:30 +02:00
parent 76319ba360
commit 8d3979372b
36 changed files with 416 additions and 230 deletions

View File

@@ -5,10 +5,11 @@ import { join } from 'path';
import * as url from 'url';
import { createResponse, MockResponse } from 'node-mocks-http';
import streamifyArray from 'streamify-array';
import { ResourceStore } from '../../index';
import { RepresentationMetadata, ResourceStore } from '../../index';
import { PermissionSet } from '../../src/ldp/permissions/PermissionSet';
import { HttpHandler } from '../../src/server/HttpHandler';
import { HttpRequest } from '../../src/server/HttpRequest';
import { MA_CONTENT_TYPE } from '../../src/util/MetadataTypes';
import { call } from './Util';
export class AclTestHelper {
@@ -49,11 +50,7 @@ export class AclTestHelper {
const representation = {
binary: true,
data: streamifyArray(acl),
metadata: {
raw: [],
profiles: [],
contentType: 'text/turtle',
},
metadata: new RepresentationMetadata({ [MA_CONTENT_TYPE]: 'text/turtle' }),
};
return this.store.setRepresentation(