UNPKG

rdf-test-suite

Version:
30 lines (29 loc) 1.15 kB
import { RdfObjectLoader, Resource } from "rdf-object"; import { IManifest } from "./IManifest"; import { ITestCase } from "./testcase/ITestCase"; import { ITestCaseHandler } from "./testcase/ITestCaseHandler"; import { IFetchOptions } from "./Util"; /** * A ManifestLoader loads test suites from URLs. */ export declare class ManifestLoader { static readonly DEFAULT_TEST_CASE_HANDLERS: { [uri: string]: ITestCaseHandler<ITestCase<any>>; }; static readonly LOADER_CONTEXT: any; private readonly testCaseHandlers; constructor(args?: IManifestLoaderArgs); /** * Load the manifest from the given URL. * @param {string} url The URL of a manifest. * @param {IFetchOptions} options The fetch options. * @return {Promise<IManifest>} A promise that resolves to a manifest object. */ from(url: string, options?: IFetchOptions): Promise<IManifest>; protected import(objectLoader: RdfObjectLoader, urlInitial: string, options?: IFetchOptions): Promise<Resource>; } export interface IManifestLoaderArgs { testCaseHandlers?: { [uri: string]: ITestCaseHandler<ITestCase<any>>; }; }