mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
refactor: Rename UriUtil into TermUtil.
This commit is contained in:
@@ -12,7 +12,7 @@ import type { SystemError } from '../../../../src/util/errors/SystemError';
|
||||
import { UnsupportedMediaTypeHttpError } from '../../../../src/util/errors/UnsupportedMediaTypeHttpError';
|
||||
import type { Guarded } from '../../../../src/util/GuardedStream';
|
||||
import { guardedStreamFrom, readableToString } from '../../../../src/util/StreamUtil';
|
||||
import { toLiteral } from '../../../../src/util/UriUtil';
|
||||
import { toLiteral } from '../../../../src/util/TermUtil';
|
||||
import { CONTENT_TYPE, DC, LDP, POSIX, RDF, XSD } from '../../../../src/util/Vocabularies';
|
||||
import { mockFs } from '../../../util/Util';
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ import {
|
||||
toObjectTerm,
|
||||
toLiteral,
|
||||
isTerm,
|
||||
} from '../../../src/util/UriUtil';
|
||||
import { CONTENT_TYPE, XSD } from '../../../src/util/Vocabularies';
|
||||
} from '../../../src/util/TermUtil';
|
||||
import { CONTENT_TYPE_TERM, XSD } from '../../../src/util/Vocabularies';
|
||||
|
||||
describe('An UriUtil', (): void => {
|
||||
describe('TermUtil', (): void => {
|
||||
describe('isTerm function', (): void => {
|
||||
it('checks if any input is a Term.', async(): Promise<void> => {
|
||||
expect(isTerm(namedNode('name'))).toBeTruthy();
|
||||
@@ -38,7 +38,7 @@ describe('An UriUtil', (): void => {
|
||||
});
|
||||
|
||||
it('supports URI shorthands.', async(): Promise<void> => {
|
||||
expect(toCachedNamedNode('contentType')).toEqualRdfTerm(namedNode(CONTENT_TYPE));
|
||||
expect(toCachedNamedNode('contentType')).toEqualRdfTerm(CONTENT_TYPE_TERM);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user