mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
test: Add SPARQL endpoint integration test.
This commit is contained in:
committed by
Joachim Van Herwegen
parent
17d774fc18
commit
1055beea92
@@ -31,10 +31,11 @@ import {
|
||||
export class DataAccessorBasedConfig implements ServerConfig {
|
||||
public store: ResourceStore;
|
||||
|
||||
public constructor(base: string, dataAccessor: DataAccessor) {
|
||||
public constructor(base: string, dataAccessor: DataAccessor, inType?: string) {
|
||||
this.store = getConvertingStore(
|
||||
getDataAccessorStore(base, dataAccessor),
|
||||
[ new QuadToRdfConverter(), new RdfToQuadConverter() ],
|
||||
inType,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -75,8 +75,13 @@ export const getInMemoryResourceStore = (base = BASE): DataAccessorBasedStore =>
|
||||
* @returns The converting store.
|
||||
*/
|
||||
export const getConvertingStore =
|
||||
(store: ResourceStore, converters: RepresentationConverter[]): RepresentationConvertingStore =>
|
||||
new RepresentationConvertingStore(store, { outConverter: new CompositeAsyncHandler(converters) });
|
||||
(store: ResourceStore, converters: RepresentationConverter[], inType?: string):
|
||||
RepresentationConvertingStore =>
|
||||
new RepresentationConvertingStore(store, {
|
||||
inConverter: new CompositeAsyncHandler(converters),
|
||||
outConverter: new CompositeAsyncHandler(converters),
|
||||
inType,
|
||||
});
|
||||
|
||||
/**
|
||||
* Gives a patching store based on initial store.
|
||||
|
||||
Reference in New Issue
Block a user