Skip to content

Commit

Permalink
tests: fix NamedNodes in new tests after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterTimn committed Apr 13, 2022
1 parent e21eca3 commit 34c824a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions test/unit/storage/DataAccessorBasedStore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,8 @@ describe('A DataAccessorBasedStore', (): void => {

it('errors on a slug ending on / without Link rel:type Container header.', async(): Promise<void> => {
const resourceID = { path: root };
representation.metadata.removeAll(RDF.type);
representation.metadata.add(SOLID_HTTP.slug, 'noContainer/');
representation.metadata.removeAll(RDF.terms.type);
representation.metadata.add(SOLID_HTTP.terms.slug, 'noContainer/');
representation.data = guardedStreamFrom([ `` ]);
const result = store.addResource(resourceID, representation);

Expand All @@ -316,9 +316,9 @@ describe('A DataAccessorBasedStore', (): void => {
it('creates a URI when the incoming slug does not end with /, ' +
'but has a Link rel:type Container header.', async(): Promise<void> => {
const resourceID = { path: root };
representation.metadata.removeAll(RDF.type);
representation.metadata.add(RDF.type, LDP.terms.Container);
representation.metadata.add(SOLID_HTTP.slug, 'newContainer');
representation.metadata.removeAll(RDF.terms.type);
representation.metadata.add(RDF.terms.type, LDP.terms.Container);
representation.metadata.add(SOLID_HTTP.terms.slug, 'newContainer');
representation.data = guardedStreamFrom([ `` ]);
const result = await store.addResource(resourceID, representation);
expect(result).toEqual({
Expand Down
4 changes: 2 additions & 2 deletions test/unit/storage/accessors/FileDataAccessor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ describe('A FileDataAccessor', (): void => {
`${base}container/resource2`,
]));

const types1 = children[0].getAll(RDF.type).map((term): string => term.value);
const types2 = children[1].getAll(RDF.type).map((term): string => term.value);
const types1 = children[0].getAll(RDF.terms.type).map((term): string => term.value);
const types2 = children[1].getAll(RDF.terms.type).map((term): string => term.value);

expect(types1).toContain('http://www.w3.org/ns/iana/media-types/application/octet-stream#Resource');
for (const type of types2) {
Expand Down

0 comments on commit 34c824a

Please sign in to comment.