rdf-test-suite 2.7.0 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -15,6 +15,7 @@ or it can output machine-readable reports in the
15
15
  Currently, the following test suites are supported:
16
16
  * [SPARQL 1.0](https://w3c.github.io/rdf-tests/sparql/sparql10/)
17
17
  * [SPARQL 1.1](https://w3c.github.io/rdf-tests/sparql/sparql11/)
18
+ * [SPARQL 1.2](https://w3c.github.io/rdf-tests/sparql/sparql12/)
18
19
  * [RDF/XML](https://w3c.github.io/rdf-tests/rdf/rdf11/rdf-xml/)
19
20
  * [N-Triples](https://w3c.github.io/rdf-tests/rdf/rdf11/rdf-n-triples/)
20
21
  * [N-Quads](https://w3c.github.io/rdf-tests/rdf/rdf11/rdf-n-quads/)
@@ -32,7 +33,6 @@ However, this package is fully _modular_,
32
33
  so that support for different test cases can be implemented easily.
33
34
 
34
35
  Planned support:
35
- * [SPARQL 1.1](http://w3c.github.io/rdf-tests/sparql/sparql11/) (_other specifications_)
36
36
  * [RDF Schema and Semantics](https://w3c.github.io/rdf-tests/rdf-mt/reports/)
37
37
  * [JSON-LD](https://w3c.github.io/json-ld-api/tests/) (_other test suites_)
38
38
 
@@ -262,6 +262,15 @@ $ rdf-test-suite myengine.js http://w3c.github.io/rdf-tests/sparql/sparql11/mani
262
262
  -i '{ "protocolEndpoint": "http://localhost:3000/sparql" }'
263
263
  ```
264
264
 
265
+ The SPARQL 1.1 Graph Store Protocol tests do the same, through the optional
266
+ `startGraphStoreEndpoint` method and the `graphStoreEndpoint` option.
267
+
268
+ ```bash
269
+ $ rdf-test-suite myengine.js http://w3c.github.io/rdf-tests/sparql/sparql11/manifest-all.ttl \
270
+ -s http://www.w3.org/TR/sparql11-http-rdf-update/ \
271
+ -i '{ "graphStoreEndpoint": "http://localhost:3000/sparql" }'
272
+ ```
273
+
265
274
  ### Test timeouts
266
275
 
267
276
  By default, all tests are allowed to run 3000 ms.
@@ -320,11 +329,11 @@ $ rdf-test-suite myengine.js https://w3c.github.io/rdf-tests/sparql/sparql11/man
320
329
  | [SPARQL 1.1 tests](https://w3c.github.io/rdf-tests/sparql/sparql11/) | [SPARQL 1.1 Update](http://www.w3.org/TR/sparql11-update/) | [`IUpdateEngine`](https://github.com/rubensworks/rdf-test-suite.js/blob/master/lib/testcase/sparql/IUpdateEngine.ts) | http://w3c.github.io/rdf-tests/sparql/sparql11/manifest-all.ttl |
321
330
  | [SPARQL 1.1 tests](https://w3c.github.io/rdf-tests/sparql/sparql11/) | [SPARQL 1.1 Results CSV/TSV](http://www.w3.org/TR/sparql11-results-csv-tsv/) | [`IQueryEngine`](https://github.com/rubensworks/rdf-test-suite.js/blob/master/lib/testcase/sparql/IQueryEngine.ts) | http://w3c.github.io/rdf-tests/sparql/sparql11/manifest-all.ttl |
322
331
  | [SPARQL 1.1 tests](https://w3c.github.io/rdf-tests/sparql/sparql11/) | [SPARQL 1.1 Results JSON](http://www.w3.org/TR/sparql11-results-json/) | [`IQueryEngine`](https://github.com/rubensworks/rdf-test-suite.js/blob/master/lib/testcase/sparql/IQueryEngine.ts) | http://w3c.github.io/rdf-tests/sparql/sparql11/manifest-all.ttl |
323
- | [SPARQL 1.1 tests](https://w3c.github.io/rdf-tests/sparql/sparql11/) | [SPARQL 1.1 Federated Query](http://www.w3.org/TR/sparql11-federated-query/) | ✖ | http://w3c.github.io/rdf-tests/sparql/sparql11/manifest-all.ttl |
332
+ | [SPARQL 1.1 tests](https://w3c.github.io/rdf-tests/sparql/sparql11/) | [SPARQL 1.1 Federated Query](http://www.w3.org/TR/sparql11-federated-query/) | [`IQueryEngine`](https://github.com/rubensworks/rdf-test-suite.js/blob/master/lib/testcase/sparql/IQueryEngine.ts) | http://w3c.github.io/rdf-tests/sparql/sparql11/manifest-all.ttl |
324
333
  | [SPARQL 1.1 tests](https://w3c.github.io/rdf-tests/sparql/sparql11/) | [SPARQL 1.1 Entailment](http://www.w3.org/TR/sparql11-entailment/) | ✖ | http://w3c.github.io/rdf-tests/sparql/sparql11/manifest-all.ttl |
325
334
  | [SPARQL 1.1 tests](https://w3c.github.io/rdf-tests/sparql/sparql11/) | [SPARQL 1.1 Service Description](http://www.w3.org/TR/sparql11-service-description/) | ✔ | http://w3c.github.io/rdf-tests/sparql/sparql11/manifest-all.ttl |
326
335
  | [SPARQL 1.1 tests](https://w3c.github.io/rdf-tests/sparql/sparql11/) | [SPARQL 1.1 Protocol](http://www.w3.org/TR/sparql11-protocol/) | ✔ | http://w3c.github.io/rdf-tests/sparql/sparql11/manifest-all.ttl |
327
- | [SPARQL 1.1 tests](https://w3c.github.io/rdf-tests/sparql/sparql11/) | [SPARQL 1.1 HTTP RDF Update](http://www.w3.org/TR/sparql11-http-rdf-update/) | ✖ | http://w3c.github.io/rdf-tests/sparql/sparql11/manifest-all.ttl |
336
+ | [SPARQL 1.1 tests](https://w3c.github.io/rdf-tests/sparql/sparql11/) | [SPARQL 1.1 HTTP RDF Update](http://www.w3.org/TR/sparql11-http-rdf-update/) | ✔ | http://w3c.github.io/rdf-tests/sparql/sparql11/manifest-all.ttl |
328
337
  | [RDF/XML Syntax Tests](https://w3c.github.io/rdf-tests/rdf/rdf11/rdf-xml/) | [RDF 1.1 XML Syntax](https://www.w3.org/TR/rdf-syntax-grammar/) | [`IParser`](https://github.com/rubensworks/rdf-test-suite.js/blob/master/lib/testcase/rdfsyntax/IParser.ts) | https://w3c.github.io/rdf-tests/rdf/rdf11/rdf-xml/manifest.ttl |
329
338
  | [N-Triples Tests](https://w3c.github.io/rdf-tests/rdf/rdf11/rdf-n-triples//) | [RDF 1.1 N-Triples](https://www.w3.org/TR/n-triples/) | [`IParser`](https://github.com/rubensworks/rdf-test-suite.js/blob/master/lib/testcase/rdfsyntax/IParser.ts) | https://w3c.github.io/rdf-tests/rdf/rdf11/rdf-n-triples/manifest.ttl |
330
339
  | [N-Quads Tests](https://w3c.github.io/rdf-tests/rdf/rdf11/rdf-n-quads/) | [RDF 1.1 N-Quads](https://www.w3.org/TR/n-quads/) | [`IParser`](https://github.com/rubensworks/rdf-test-suite.js/blob/master/lib/testcase/rdfsyntax/IParser.ts) | https://w3c.github.io/rdf-tests/rdf/rdf11/rdf-n-quads/manifest.ttl |
package/index.d.ts CHANGED
@@ -15,6 +15,7 @@ export * from './lib/testcase/sparql/QueryResultBindings';
15
15
  export * from './lib/testcase/sparql/QueryResultBoolean';
16
16
  export * from './lib/testcase/sparql/QueryResultQuads';
17
17
  export * from './lib/testcase/sparql/TestCaseCsvResultFormat';
18
+ export * from './lib/testcase/sparql/TestCaseGraphStoreProtocol';
18
19
  export * from './lib/testcase/sparql/TestCaseNegativeSyntax';
19
20
  export * from './lib/testcase/sparql/TestCasePositiveSyntax';
20
21
  export * from './lib/testcase/sparql/TestCaseProtocol';
package/index.js CHANGED
@@ -31,6 +31,7 @@ __exportStar(require("./lib/testcase/sparql/QueryResultBindings"), exports);
31
31
  __exportStar(require("./lib/testcase/sparql/QueryResultBoolean"), exports);
32
32
  __exportStar(require("./lib/testcase/sparql/QueryResultQuads"), exports);
33
33
  __exportStar(require("./lib/testcase/sparql/TestCaseCsvResultFormat"), exports);
34
+ __exportStar(require("./lib/testcase/sparql/TestCaseGraphStoreProtocol"), exports);
34
35
  __exportStar(require("./lib/testcase/sparql/TestCaseNegativeSyntax"), exports);
35
36
  __exportStar(require("./lib/testcase/sparql/TestCasePositiveSyntax"), exports);
36
37
  __exportStar(require("./lib/testcase/sparql/TestCaseProtocol"), exports);
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wFAAsE;AACtE,uFAAqE;AACrE,sFAAoE;AACpE,8FAA4E;AAC5E,wEAAsD;AACtD,0EAAwD;AACxD,mEAAiD;AACjD,uEAAqD;AACrD,kFAAgE;AAChE,8EAA4D;AAC5D,qEAAmD;AACnD,wEAAsD;AACtD,sEAAoD;AACpD,4EAA0D;AAC1D,2EAAyD;AACzD,yEAAuD;AACvD,gFAA8D;AAC9D,+EAA6D;AAC7D,+EAA6D;AAC7D,yEAAuD;AACvD,gFAA8D;AAC9D,mFAAiE;AACjE,iFAA+D;AAC/D,2DAAyC;AACzC,kEAAgD;AAChD,qEAAmD;AACnD,kDAAgC;AAChC,uDAAqC;AACrC,wDAAsC;AACtC,6CAA2B;AAC3B,qDAAmC;AACnC,kDAAgC;AAChC,6DAA2C;AAC3C,oEAAkD","sourcesContent":["export * from './lib/testcase/rdfsyntax/jsonld/TestCaseJsonLdFromRdf';\nexport * from './lib/testcase/rdfsyntax/jsonld/TestCaseJsonLdSyntax';\nexport * from './lib/testcase/rdfsyntax/jsonld/TestCaseJsonLdToRdf';\nexport * from './lib/testcase/rdfsyntax/jsonld/TestCaseJsonLdToRdfNegative';\nexport * from './lib/testcase/rdfsyntax/TestCaseEval';\nexport * from './lib/testcase/rdfsyntax/TestCaseSyntax';\nexport * from './lib/testcase/rdfsyntax/IParser';\nexport * from './lib/testcase/rdfsyntax/ISerializer';\nexport * from './lib/testcase/rdfsyntax/ITestCaseFromRdfSyntax';\nexport * from './lib/testcase/rdfsyntax/ITestCaseRdfSyntax';\nexport * from './lib/testcase/sparql/IQueryEngine';\nexport * from './lib/testcase/sparql/ITestCaseSparql';\nexport * from './lib/testcase/sparql/IUpdateEngine';\nexport * from './lib/testcase/sparql/QueryResultBindings';\nexport * from './lib/testcase/sparql/QueryResultBoolean';\nexport * from './lib/testcase/sparql/QueryResultQuads';\nexport * from './lib/testcase/sparql/TestCaseCsvResultFormat';\nexport * from './lib/testcase/sparql/TestCaseNegativeSyntax';\nexport * from './lib/testcase/sparql/TestCasePositiveSyntax';\nexport * from './lib/testcase/sparql/TestCaseProtocol';\nexport * from './lib/testcase/sparql/TestCaseQueryEvaluation';\nexport * from './lib/testcase/sparql/TestCaseServiceDescription';\nexport * from './lib/testcase/sparql/TestCaseUpdateEvaluation';\nexport * from './lib/testcase/ITestCase';\nexport * from './lib/testcase/ITestCaseHandler';\nexport * from './lib/testcase/TestCaseUnsupported';\nexport * from './lib/IManifest';\nexport * from './lib/ManifestLoader';\nexport * from './lib/TestSuiteRunner';\nexport * from './lib/Util';\nexport * from './lib/ErrorSkipped';\nexport * from './lib/ErrorTest';\nexport * from './lib/DocumentLoaderCached';\nexport * from './lib/testcase/TestCaseMediaTypes';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wFAAsE;AACtE,uFAAqE;AACrE,sFAAoE;AACpE,8FAA4E;AAC5E,wEAAsD;AACtD,0EAAwD;AACxD,mEAAiD;AACjD,uEAAqD;AACrD,kFAAgE;AAChE,8EAA4D;AAC5D,qEAAmD;AACnD,wEAAsD;AACtD,sEAAoD;AACpD,4EAA0D;AAC1D,2EAAyD;AACzD,yEAAuD;AACvD,gFAA8D;AAC9D,mFAAiE;AACjE,+EAA6D;AAC7D,+EAA6D;AAC7D,yEAAuD;AACvD,gFAA8D;AAC9D,mFAAiE;AACjE,iFAA+D;AAC/D,2DAAyC;AACzC,kEAAgD;AAChD,qEAAmD;AACnD,kDAAgC;AAChC,uDAAqC;AACrC,wDAAsC;AACtC,6CAA2B;AAC3B,qDAAmC;AACnC,kDAAgC;AAChC,6DAA2C;AAC3C,oEAAkD","sourcesContent":["export * from './lib/testcase/rdfsyntax/jsonld/TestCaseJsonLdFromRdf';\nexport * from './lib/testcase/rdfsyntax/jsonld/TestCaseJsonLdSyntax';\nexport * from './lib/testcase/rdfsyntax/jsonld/TestCaseJsonLdToRdf';\nexport * from './lib/testcase/rdfsyntax/jsonld/TestCaseJsonLdToRdfNegative';\nexport * from './lib/testcase/rdfsyntax/TestCaseEval';\nexport * from './lib/testcase/rdfsyntax/TestCaseSyntax';\nexport * from './lib/testcase/rdfsyntax/IParser';\nexport * from './lib/testcase/rdfsyntax/ISerializer';\nexport * from './lib/testcase/rdfsyntax/ITestCaseFromRdfSyntax';\nexport * from './lib/testcase/rdfsyntax/ITestCaseRdfSyntax';\nexport * from './lib/testcase/sparql/IQueryEngine';\nexport * from './lib/testcase/sparql/ITestCaseSparql';\nexport * from './lib/testcase/sparql/IUpdateEngine';\nexport * from './lib/testcase/sparql/QueryResultBindings';\nexport * from './lib/testcase/sparql/QueryResultBoolean';\nexport * from './lib/testcase/sparql/QueryResultQuads';\nexport * from './lib/testcase/sparql/TestCaseCsvResultFormat';\nexport * from './lib/testcase/sparql/TestCaseGraphStoreProtocol';\nexport * from './lib/testcase/sparql/TestCaseNegativeSyntax';\nexport * from './lib/testcase/sparql/TestCasePositiveSyntax';\nexport * from './lib/testcase/sparql/TestCaseProtocol';\nexport * from './lib/testcase/sparql/TestCaseQueryEvaluation';\nexport * from './lib/testcase/sparql/TestCaseServiceDescription';\nexport * from './lib/testcase/sparql/TestCaseUpdateEvaluation';\nexport * from './lib/testcase/ITestCase';\nexport * from './lib/testcase/ITestCaseHandler';\nexport * from './lib/testcase/TestCaseUnsupported';\nexport * from './lib/IManifest';\nexport * from './lib/ManifestLoader';\nexport * from './lib/TestSuiteRunner';\nexport * from './lib/Util';\nexport * from './lib/ErrorSkipped';\nexport * from './lib/ErrorTest';\nexport * from './lib/DocumentLoaderCached';\nexport * from './lib/testcase/TestCaseMediaTypes';\n"]}
@@ -68,6 +68,11 @@ const ENDPOINT_SPECIFICATIONS = [
68
68
  option: 'protocolEndpoint',
69
69
  start: engine => { var _a; return (_a = engine.startProtocolEndpoint) === null || _a === void 0 ? void 0 : _a.call(engine); },
70
70
  },
71
+ {
72
+ specification: 'http://www.w3.org/TR/sparql11-http-rdf-update/',
73
+ option: 'graphStoreEndpoint',
74
+ start: engine => { var _a; return (_a = engine.startGraphStoreEndpoint) === null || _a === void 0 ? void 0 : _a.call(engine); },
75
+ },
71
76
  ];
72
77
  /**
73
78
  * TestSuiteRunner runs a certain test suite manifest.
@@ -1 +1 @@
1
- {"version":3,"file":"TestSuiteRunner.js","sourceR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ACrC,kBAAkB,EAAE,WAAW,CAAC,IAAI;YACpC,cAAc,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,iCAAiC,WAAW,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI;YAC9F,OAAO,EAAE;gBACP;oBACE,QAAQ,EAAE,IAAI;oBACd,IAAI,EAAE,WAAW,CAAC,MAAM;oBACxB,GAAG,EAAE,iCAAiC,WAAW,CAAC,IAAI,UAAU;iBACjE;aACF;YACD,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,WAAI,CAAC,YAAY,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI;YAC/E,SAAS,EAAE,IAAI;YACf,iBAAiB,EAAE,EAAE;YACrB,OAAO,EAAE,WAAW,CAAC,OAAO;SAC7B,CAAC;IACJ,CAAC;CACF;AA3TD,0CA2TC","sourcesContent":["import type * as RDF from '@rdfjs/types';\nimport * as LogSymbols from 'log-symbols';\nimport { DataFactory } from 'rdf-data-factory';\nimport type { IManifest } from './IManifest';\nimport { ManifestLoader } from './ManifestLoader';\nimport type { ITestCase } from './testcase/ITestCase';\nimport type { IQueryEngine, ISparqlEndpoint } from './testcase/sparql/IQueryEngine';\nimport { Util } from './Util';\nimport WriteStream = NodeJS.WriteStream;\nimport Timeout = NodeJS.Timeout;\n\n// eslint-disable-next-line ts/no-require-imports, ts/no-var-requires\nconst quad = require('rdf-quad');\n// eslint-disable-next-line ts/no-require-imports, ts/no-var-requires\nconst streamifyArray = require('streamify-array').streamifyArray;\n\nconst DF = new DataFactory();\n\n/**\n * The specifications that are tested against a running endpoint,\n * together with the engine method that starts it,\n * and the custom engine option that its URL is passed to.\n */\nconst ENDPOINT_SPECIFICATIONS: {\n specification: string;\n option: string;\n start: (engine: IQueryEngine) => Promise<ISparqlEndpoint> | undefined;\n}[] = [\n {\n specification: 'http://www.w3.org/TR/sparql11-service-description/',\n option: 'serviceDescriptionEndpoint',\n start: engine => engine.startServiceDescriptionEndpoint?.(),\n },\n {\n specification: 'http://www.w3.org/TR/sparql11-protocol/',\n option: 'protocolEndpoint',\n start: engine => engine.startProtocolEndpoint?.(),\n },\n];\n\nexport interface ITestSuiteConfig {\n exitWithStatusCode0: boolean;\n explicitApproval?: boolean;\n runRejected?: boolean;\n outputFormat: string;\n timeOutDuration: number;\n customEngingeOptions: object;\n specification?: string;\n cachePath?: string;\n testRegex?: RegExp;\n skipRegex?: RegExp;\n urlToFileMapping?: string;\n}\n\n/**\n * TestSuiteRunner runs a certain test suite manifest.\n */\nexport class TestSuiteRunner {\n /**\n * Parse an URL to file mapping string.\n * @param {string} urlToFileMapping An URL to file mapping string\n * @return {{url: string; path: string}[]} A parsed URL to file mapping array.\n */\n public fromUrlToMappingString(urlToFileMapping?: string): { url: string; path: string }[] {\n const urlToFileMappings: { url: string; path: string }[] = [];\n if (urlToFileMapping) {\n const [ url, path ]: string[] = urlToFileMapping.split('~');\n urlToFileMappings.push({ url, path });\n }\n return urlToFileMappings;\n }\n\n /**\n * Run the manifest with the given URL.\n * @param {string} manifestUrl The URL of a manifest.\n * @param handler The handler to run the tests with.\n * @param config The test suite configuration.\n * @return {Promise<ITestResult[]>} A promise resolving to an array of test results.\n */\n public async runManifest(manifestUrl: string, handler: any, config: ITestSuiteConfig): Promise<ITestResult[]> {\n const { cachePath, specification, urlToFileMapping } = config;\n const urlToFileMappings = this.fromUrlToMappingString(urlToFileMapping);\n const manifest: IManifest = await new ManifestLoader().from(manifestUrl, { cachePath, urlToFileMappings });\n const results: ITestResult[] = [];\n\n // Only run the tests for the given specification if one was defined.\n if (specification) {\n if (!manifest.specifications || !manifest.specifications[specification]) {\n return [];\n }\n await this.runManifestWithEndpoint(manifest.specifications[specification], handler, config, results);\n return results;\n }\n\n await this.runManifestWithEndpoint(manifest, handler, config, results);\n return results;\n }\n\n /**\n * Run a manifest, starting an endpoint if the selected specification requires one.\n * @param {string} manifest A manifest.\n * @param handler The handler to run the tests with.\n * @param config The test suite configuration.\n * @param {ITestResult[]} results An array to append the test results to.\n * @return {Promise<void>} A promise resolving when the tests are finished.\n */\n private async runManifestWithEndpoint(\n manifest: IManifest,\n handler: any,\n config: ITestSuiteConfig,\n results: ITestResult[],\n ): Promise<void> {\n const customEngineOptions = <Record<string, unknown>> config.customEngingeOptions;\n const endpointSpecification = ENDPOINT_SPECIFICATIONS\n .find(entry => entry.specification === config.specification && !customEngineOptions[entry.option]);\n const endpoint = endpointSpecification ? await endpointSpecification.start(<IQueryEngine> handler) : undefined;\n\n if (!endpoint) {\n await this.runManifestConcrete(manifest, handler, config, results);\n return;\n }\n\n try {\n await this.runManifestConcrete(manifest, handler, {\n ...config,\n customEngingeOptions: {\n ...customEngineOptions,\n [endpointSpecification.option]: endpoint.endpoint,\n },\n }, results);\n } finally {\n await endpoint.close();\n }\n }\n\n /**\n * Run the given manifest.\n * @param {string} manifest A manifest.\n * @param handler The handler to run the tests with.\n * @param config The test suite configuration.\n * @param {ITestResult[]} results An array to append the test results to\n * @return {Promise<void>} A promise resolving when the tests are finished.\n */\n public async runManifestConcrete(\n manifest: IManifest,\n handler: any,\n config: ITestSuiteConfig,\n results: ITestResult[],\n ) {\n // Execute all tests in this manifest\n if (manifest.testEntries) {\n for (const test of manifest.testEntries) {\n if ((!config.testRegex || config.testRegex.test(test.uri)) && !(config.skipRegex && config.skipRegex.test(test.uri))) {\n if (!config.runRejected && test.approval === 'http://www.w3.org/ns/rdftest#Rejected') {\n // Skip tests that are explicitly rejected\n results.push({ test, ok: false, skipped: true, error: new Error('Rejected Test') });\n } else if (config.explicitApproval && test.approval !== 'http://www.w3.org/ns/rdftest#Approved') {\n // Skip tests that are explicitly rejected\n results.push({ test, ok: false, skipped: true, error: new Error('Test not explicitly approved') });\n } else {\n let timeout: Timeout = null;\n const timeStart = process.hrtime();\n let testResultOverride: ITestResultOverride | undefined;\n try {\n await Promise.race([\n test.test(handler, config.customEngingeOptions)\n .then((result) => {\n if (result) {\n testResultOverride = result;\n }\n }),\n new Promise((res, rej) => {\n // Global.setTimeout is used here to avoid browser/node compatibility issues\n timeout = globalThis.setTimeout(\n () => rej(new Error(`Test case '${test.uri}' timed out`)),\n config.timeOutDuration,\n );\n }),\n ]);\n } catch (error) {\n clearTimeout(timeout);\n results.push({ test, ok: false, error: <any> error, skipped: (<any> error).skipped });\n continue;\n }\n const timeEnd = process.hrtime(timeStart);\n clearTimeout(timeout);\n results.push({ test, ok: true, duration: (timeEnd[0] * 1000) + (timeEnd[1] / 1000000), ...testResultOverride });\n }\n }\n }\n }\n\n // Recursively handle all sub-manifests\n if (manifest.subManifests) {\n for (const subManifest of manifest.subManifests) {\n await (this.runManifestConcrete(subManifest, handler, config, results));\n }\n }\n }\n\n /**\n * Print the given test results to a text stream.\n * @param {WriteStream} stdout The output stream to write to.\n * @param {ITestResult[]} results An array of test results.\n * @param {boolean} compact If the results should be printed in compact-mode.\n */\n public resultsToText(stdout: WriteStream, results: ITestResult[], compact: boolean) {\n const failedTests: ITestResult[] = [];\n let success = 0;\n let skipped = 0;\n for (const result of results) {\n if (result.ok) {\n success++;\n stdout.write(`${LogSymbols.success} ${result.test.name} (${result.test.uri})${` ${Util.withColor(`${result.duration}ms`, Util.colorGray)}`}\\n`);\n } else if (result.skipped) {\n skipped++;\n stdout.write(`${LogSymbols.info} ${result.test.name} (${result.test.uri})\\n`);\n } else {\n failedTests.push(result);\n stdout.write(`${LogSymbols.error} ${result.test.name} (${result.test.uri})\\n`);\n }\n }\n\n if (!compact) {\n for (const result of failedTests) {\n stdout.write(`\n${LogSymbols.error} ${Util.withColor(result.test.name, Util.colorRed)}\n ${result.test.comment || ''}\n ${'test' in result.error ? result.error : result.error.stack}\n ${Util.withColor(`More info: ${result.test.uri}`, Util.colorBlue)}\n\n`);\n }\n }\n\n const skippedString = skipped ? ` (skipped ${skipped})` : '';\n success += skipped;\n if (success === results.length) {\n stdout.write(`${LogSymbols.success} ${success} / ${results.length} tests succeeded!${skippedString}\\n`);\n } else {\n stdout.write(`${LogSymbols.error} ${success} / ${results.length} tests succeeded!${skippedString}\\n`);\n }\n }\n\n /**\n * Convert test results to an RDF stream.\n * @param {ITestResult[]} results Test results.\n * @param {IEarlProperties} properties EARL properties.\n * @param {Date} testDate The date at which the tests were executed.\n * @return {Stream} An RDF stream of quads.\n */\n public resultsToEarl(results: ITestResult[], properties: IEarlProperties, testDate: Date): RDF.Stream {\n // eslint-disable-next-line ts/no-require-imports, ts/no-var-requires\n const p = require('./prefixes.json');\n const dateRaw = testDate.toISOString();\n const date = `\"${dateRaw}\"^^${p.xsd}dateTime`;\n const quads: RDF.Quad[] = [];\n\n // Describe report\n const report = properties.reportUri || '';\n quads.push(DF.quad(DF.namedNode(report), DF.namedNode(`${p.foaf}primaryTopic`), DF.namedNode(properties.applicationUri)));\n quads.push(DF.quad(DF.namedNode(report), DF.namedNode(`${p.dc}issued`), DF.literal(testDate.toISOString(), DF.namedNode(`${p.xsd}dateTime`))));\n for (const author of properties.authors) {\n quads.push(DF.quad(DF.namedNode(report), DF.namedNode(`${p.foaf}maker`), DF.namedNode(author.uri)));\n }\n\n // Describe application\n const app = properties.applicationUri;\n quads.push(quad(app, `${p.rdf}type`, `${p.earl}Software`));\n quads.push(quad(app, `${p.rdf}type`, `${p.earl}TestSubject`));\n quads.push(quad(app, `${p.rdf}type`, `${p.doap}Project`));\n quads.push(quad(app, `${p.doap}name`, `\"${properties.applicationNameFull}\"`));\n quads.push(quad(app, `${p.dc}title`, `\"${properties.applicationNameFull}\"`));\n if (properties.version) {\n quads.push(quad(app, `${p.doap}release`, '_:b_release'));\n quads.push(quad('_:b_release', `${p.doap}revision`, `\"${properties.version}\"`));\n }\n quads.push(quad(app, `${p.doap}homepage`, properties.applicationHomepageUrl));\n quads.push(quad(app, `${p.doap}license`, properties.licenseUri));\n quads.push(quad(app, `${p.doap}programming-language`, '\"JavaScript\"'));\n for (const spec of properties.specificationUris) {\n quads.push(quad(app, `${p.doap}implements`, spec));\n }\n quads.push(quad(app, `${p.doap}category`, 'http://dbpedia.org/resource/Resource_Description_Framework'));\n quads.push(quad(app, `${p.doap}download-page`, `https://npmjs.org/package/${properties.applicationNameNpm}`));\n if (properties.applicationBugsUrl) {\n quads.push(quad(app, `${p.doap}bug-database`, properties.applicationBugsUrl));\n }\n if (properties.applicationBlogUrl) {\n quads.push(quad(app, `${p.doap}blog`, properties.applicationBlogUrl));\n }\n for (const author of properties.authors) {\n quads.push(quad(app, `${p.doap}developer`, author.uri));\n quads.push(quad(app, `${p.doap}maintainer`, author.uri));\n quads.push(quad(app, `${p.doap}documenter`, author.uri));\n quads.push(quad(app, `${p.doap}maker`, author.uri));\n quads.push(quad(app, `${p.dc}creator`, author.uri));\n }\n quads.push(quad(app, `${p.dc}description`, `\"${properties.applicationDescription}\"@en`));\n quads.push(quad(app, `${p.doap}description`, `\"${properties.applicationDescription}\"@en`));\n\n // Describe authors\n for (const author of properties.authors) {\n quads.push(quad(author.uri, `${p.rdf}type`, `${p.foaf}Person`));\n quads.push(quad(author.uri, `${p.rdf}type`, `${p.earl}Assertor`));\n if (author.name) {\n quads.push(quad(author.uri, `${p.foaf}name`, `\"${author.name}\"`));\n }\n if (author.homepage) {\n quads.push(quad(author.uri, `${p.foaf}homepage`, author.homepage));\n }\n if (author.primaryTopic) {\n quads.push(quad(author.uri, `${p.foaf}primaryTopicOf`, author.primaryTopic));\n }\n }\n\n // Describe test results\n let id = 0;\n for (const result of results) {\n const testUri = result.test.uri;\n quads.push(quad(testUri, `${p.rdf}type`, `${p.earl}TestCriterion`));\n quads.push(quad(testUri, `${p.rdf}type`, `${p.earl}TestCase`));\n quads.push(quad(testUri, `${p.dc}title`, `\"${result.test.name}\"`));\n if (result.test.comment) {\n quads.push(quad(testUri, `${p.dc}description`, `\"${result.test.comment}\"`));\n }\n quads.push(quad(testUri, `${p.earl}assertions`, `_:assertions${id}`));\n quads.push(quad(`_:assertions${id}`, `${p.rdf}first`, `_:assertion${id}`));\n quads.push(quad(`_:assertions${id}`, `${p.rdf}rest`, `${p.rdf}nil`));\n quads.push(quad(`_:assertion${id}`, `${p.rdf}type`, `${p.earl}Assertion`));\n for (const author of properties.authors) {\n quads.push(quad(`_:assertion${id}`, `${p.earl}assertedBy`, author.uri));\n }\n quads.push(quad(`_:assertion${id}`, `${p.earl}test`, testUri));\n quads.push(quad(`_:assertion${id}`, `${p.earl}subject`, app));\n quads.push(quad(`_:assertion${id}`, `${p.earl}mode`, `${p.earl}automatic`));\n quads.push(quad(`_:assertion${id}`, `${p.earl}result`, `_:result${id}`));\n quads.push(quad(`_:result${id}`, `${p.rdf}type`, `${p.earl}TestResult`));\n quads.push(quad(`_:result${id}`, `${p.earl}outcome`, p.earl + (result.ok ? 'passed' : (result.skipped ? 'inapplicable' : 'failed'))));\n quads.push(quad(`_:result${id}`, `${p.dc}date`, date));\n id++;\n }\n\n return streamifyArray(quads);\n }\n\n /**\n * Create an {#link IEarlProperties} data object based on package.json contents.\n * @param packageJson Package.json contents.\n * @return {IEarlProperties} A data object.\n */\n public packageJsonToEarlProperties(packageJson: any): IEarlProperties {\n return {\n applicationBugsUrl: packageJson.bugs && packageJson.bugs.url ? packageJson.bugs.url : packageJson.bugs,\n applicationDescription: packageJson.description,\n applicationHomepageUrl: packageJson.homepage,\n applicationNameFull: packageJson.name,\n applicationNameNpm: packageJson.name,\n applicationUri: packageJson.name ? `https://www.npmjs.com/package/${packageJson.name}/` : null,\n authors: [\n {\n homepage: null,\n name: packageJson.author,\n uri: `https://www.npmjs.com/package/${packageJson.name}/#author`,\n },\n ],\n licenseUri: packageJson.license ? Util.licenseToUri(packageJson.license) : null,\n reportUri: null,\n specificationUris: [],\n version: packageJson.version,\n };\n }\n}\n\nexport interface IEarlProperties {\n reportUri: string;\n authors: IAuthor[];\n licenseUri: string;\n applicationUri: string;\n applicationHomepageUrl: string;\n applicationBugsUrl?: string;\n applicationBlogUrl?: string;\n applicationNameFull: string;\n applicationNameNpm: string;\n applicationDescription: string;\n specificationUris: string[];\n version?: string;\n}\n\nexport interface IAuthor {\n uri: string;\n name?: string;\n homepage?: string;\n primaryTopic?: string;\n}\n\nexport interface ITestResult extends ITestResultOverride {\n test: ITestCase<any>;\n ok: boolean;\n error?: Error;\n skipped?: boolean;\n}\n\nexport interface ITestResultOverride {\n duration?: number; // In ms\n}\n"]}
1
+ {"version":3,"file":"TestSuiteRunner.js","sourceRoot":"","sources":["TestSuiteRunner.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,wDAA0C;AAC1C,uDAA+C;AAE/C,qDAAkD;AAGlD,iCAA8B;AAI9B,qEAAqE;AACrE,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AACjC,qEAAqE;AACrE,MAAM,cAAc,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC,cAAc,CAAC;AAEjE,MAAM,EAAE,GAAG,IAAI,8BAAW,EAAE,CAAC;AAE7B;;;;GAIG;AACH,MAAM,uBAAuB,GAIvB;IACJ;QACE,aAAa,EAAE,oDAAoD;QACnE,MAAM,EAAE,4BAA4B;QACpC,KAAK,EAAE,MAAM,CAAC,EAAE,WAAC,OAAA,MAAA,MAAM,CAAC,+BAA+B,sDAAI,CAAA,EAAA;KAC5D;IACD;QACE,aAAa,EAAE,yCAAyC;QACxD,MAAM,EAAE,kBAAkB;QAC1B,KAAK,EAAE,MAAM,CAAC,EAAE,WAAC,OAAA,MAAA,MAAM,CAAC,qBAAqB,sDAAI,CAAA,EAAA;KAClD;IACD;QACE,aAAa,EAAE,gDAAgD;QAC/D,MAAM,EAAE,oBAAoB;QAC5B,KAAK,EAAE,MAAM,CAAC,EAAE,WAAC,OAAA,MAAA,MAAM,CAAC,uBAAuB,sDAAI,CAAA,EAAA;KACpD;CACF,CAAC;AAgBF;;GAEG;AACH,MAAa,eAAe;IAC1B;;;;OAIG;IACI,sBAAsB,CAAC,gBAAyB;QACrD,MAAM,iBAAiB,GAAoC,EAAE,CAAC;QAC9D,IAA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AO,cAAc,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAED;;;;OAIG;IACI,2BAA2B,CAAC,WAAgB;QACjD,OAAO;YACL,kBAAkB,EAAE,WAAW,CAAC,IAAI,IAAI,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI;YACtG,sBAAsB,EAAE,WAAW,CAAC,WAAW;YAC/C,sBAAsB,EAAE,WAAW,CAAC,QAAQ;YAC5C,mBAAmB,EAAE,WAAW,CAAC,IAAI;YACrC,kBAAkB,EAAE,WAAW,CAAC,IAAI;YACpC,cAAc,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,iCAAiC,WAAW,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI;YAC9F,OAAO,EAAE;gBACP;oBACE,QAAQ,EAAE,IAAI;oBACd,IAAI,EAAE,WAAW,CAAC,MAAM;oBACxB,GAAG,EAAE,iCAAiC,WAAW,CAAC,IAAI,UAAU;iBACjE;aACF;YACD,UAAU,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,WAAI,CAAC,YAAY,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI;YAC/E,SAAS,EAAE,IAAI;YACf,iBAAiB,EAAE,EAAE;YACrB,OAAO,EAAE,WAAW,CAAC,OAAO;SAC7B,CAAC;IACJ,CAAC;CACF;AA3TD,0CA2TC","sourcesContent":["import type * as RDF from '@rdfjs/types';\nimport * as LogSymbols from 'log-symbols';\nimport { DataFactory } from 'rdf-data-factory';\nimport type { IManifest } from './IManifest';\nimport { ManifestLoader } from './ManifestLoader';\nimport type { ITestCase } from './testcase/ITestCase';\nimport type { IQueryEngine, ISparqlEndpoint } from './testcase/sparql/IQueryEngine';\nimport { Util } from './Util';\nimport WriteStream = NodeJS.WriteStream;\nimport Timeout = NodeJS.Timeout;\n\n// eslint-disable-next-line ts/no-require-imports, ts/no-var-requires\nconst quad = require('rdf-quad');\n// eslint-disable-next-line ts/no-require-imports, ts/no-var-requires\nconst streamifyArray = require('streamify-array').streamifyArray;\n\nconst DF = new DataFactory();\n\n/**\n * The specifications that are tested against a running endpoint,\n * together with the engine method that starts it,\n * and the custom engine option that its URL is passed to.\n */\nconst ENDPOINT_SPECIFICATIONS: {\n specification: string;\n option: string;\n start: (engine: IQueryEngine) => Promise<ISparqlEndpoint> | undefined;\n}[] = [\n {\n specification: 'http://www.w3.org/TR/sparql11-service-description/',\n option: 'serviceDescriptionEndpoint',\n start: engine => engine.startServiceDescriptionEndpoint?.(),\n },\n {\n specification: 'http://www.w3.org/TR/sparql11-protocol/',\n option: 'protocolEndpoint',\n start: engine => engine.startProtocolEndpoint?.(),\n },\n {\n specification: 'http://www.w3.org/TR/sparql11-http-rdf-update/',\n option: 'graphStoreEndpoint',\n start: engine => engine.startGraphStoreEndpoint?.(),\n },\n];\n\nexport interface ITestSuiteConfig {\n exitWithStatusCode0: boolean;\n explicitApproval?: boolean;\n runRejected?: boolean;\n outputFormat: string;\n timeOutDuration: number;\n customEngingeOptions: object;\n specification?: string;\n cachePath?: string;\n testRegex?: RegExp;\n skipRegex?: RegExp;\n urlToFileMapping?: string;\n}\n\n/**\n * TestSuiteRunner runs a certain test suite manifest.\n */\nexport class TestSuiteRunner {\n /**\n * Parse an URL to file mapping string.\n * @param {string} urlToFileMapping An URL to file mapping string\n * @return {{url: string; path: string}[]} A parsed URL to file mapping array.\n */\n public fromUrlToMappingString(urlToFileMapping?: string): { url: string; path: string }[] {\n const urlToFileMappings: { url: string; path: string }[] = [];\n if (urlToFileMapping) {\n const [ url, path ]: string[] = urlToFileMapping.split('~');\n urlToFileMappings.push({ url, path });\n }\n return urlToFileMappings;\n }\n\n /**\n * Run the manifest with the given URL.\n * @param {string} manifestUrl The URL of a manifest.\n * @param handler The handler to run the tests with.\n * @param config The test suite configuration.\n * @return {Promise<ITestResult[]>} A promise resolving to an array of test results.\n */\n public async runManifest(manifestUrl: string, handler: any, config: ITestSuiteConfig): Promise<ITestResult[]> {\n const { cachePath, specification, urlToFileMapping } = config;\n const urlToFileMappings = this.fromUrlToMappingString(urlToFileMapping);\n const manifest: IManifest = await new ManifestLoader().from(manifestUrl, { cachePath, urlToFileMappings });\n const results: ITestResult[] = [];\n\n // Only run the tests for the given specification if one was defined.\n if (specification) {\n if (!manifest.specifications || !manifest.specifications[specification]) {\n return [];\n }\n await this.runManifestWithEndpoint(manifest.specifications[specification], handler, config, results);\n return results;\n }\n\n await this.runManifestWithEndpoint(manifest, handler, config, results);\n return results;\n }\n\n /**\n * Run a manifest, starting an endpoint if the selected specification requires one.\n * @param {string} manifest A manifest.\n * @param handler The handler to run the tests with.\n * @param config The test suite configuration.\n * @param {ITestResult[]} results An array to append the test results to.\n * @return {Promise<void>} A promise resolving when the tests are finished.\n */\n private async runManifestWithEndpoint(\n manifest: IManifest,\n handler: any,\n config: ITestSuiteConfig,\n results: ITestResult[],\n ): Promise<void> {\n const customEngineOptions = <Record<string, unknown>> config.customEngingeOptions;\n const endpointSpecification = ENDPOINT_SPECIFICATIONS\n .find(entry => entry.specification === config.specification && !customEngineOptions[entry.option]);\n const endpoint = endpointSpecification ? await endpointSpecification.start(<IQueryEngine> handler) : undefined;\n\n if (!endpoint) {\n await this.runManifestConcrete(manifest, handler, config, results);\n return;\n }\n\n try {\n await this.runManifestConcrete(manifest, handler, {\n ...config,\n customEngingeOptions: {\n ...customEngineOptions,\n [endpointSpecification.option]: endpoint.endpoint,\n },\n }, results);\n } finally {\n await endpoint.close();\n }\n }\n\n /**\n * Run the given manifest.\n * @param {string} manifest A manifest.\n * @param handler The handler to run the tests with.\n * @param config The test suite configuration.\n * @param {ITestResult[]} results An array to append the test results to\n * @return {Promise<void>} A promise resolving when the tests are finished.\n */\n public async runManifestConcrete(\n manifest: IManifest,\n handler: any,\n config: ITestSuiteConfig,\n results: ITestResult[],\n ) {\n // Execute all tests in this manifest\n if (manifest.testEntries) {\n for (const test of manifest.testEntries) {\n if ((!config.testRegex || config.testRegex.test(test.uri)) && !(config.skipRegex && config.skipRegex.test(test.uri))) {\n if (!config.runRejected && test.approval === 'http://www.w3.org/ns/rdftest#Rejected') {\n // Skip tests that are explicitly rejected\n results.push({ test, ok: false, skipped: true, error: new Error('Rejected Test') });\n } else if (config.explicitApproval && test.approval !== 'http://www.w3.org/ns/rdftest#Approved') {\n // Skip tests that are explicitly rejected\n results.push({ test, ok: false, skipped: true, error: new Error('Test not explicitly approved') });\n } else {\n let timeout: Timeout = null;\n const timeStart = process.hrtime();\n let testResultOverride: ITestResultOverride | undefined;\n try {\n await Promise.race([\n test.test(handler, config.customEngingeOptions)\n .then((result) => {\n if (result) {\n testResultOverride = result;\n }\n }),\n new Promise((res, rej) => {\n // Global.setTimeout is used here to avoid browser/node compatibility issues\n timeout = globalThis.setTimeout(\n () => rej(new Error(`Test case '${test.uri}' timed out`)),\n config.timeOutDuration,\n );\n }),\n ]);\n } catch (error) {\n clearTimeout(timeout);\n results.push({ test, ok: false, error: <any> error, skipped: (<any> error).skipped });\n continue;\n }\n const timeEnd = process.hrtime(timeStart);\n clearTimeout(timeout);\n results.push({ test, ok: true, duration: (timeEnd[0] * 1000) + (timeEnd[1] / 1000000), ...testResultOverride });\n }\n }\n }\n }\n\n // Recursively handle all sub-manifests\n if (manifest.subManifests) {\n for (const subManifest of manifest.subManifests) {\n await (this.runManifestConcrete(subManifest, handler, config, results));\n }\n }\n }\n\n /**\n * Print the given test results to a text stream.\n * @param {WriteStream} stdout The output stream to write to.\n * @param {ITestResult[]} results An array of test results.\n * @param {boolean} compact If the results should be printed in compact-mode.\n */\n public resultsToText(stdout: WriteStream, results: ITestResult[], compact: boolean) {\n const failedTests: ITestResult[] = [];\n let success = 0;\n let skipped = 0;\n for (const result of results) {\n if (result.ok) {\n success++;\n stdout.write(`${LogSymbols.success} ${result.test.name} (${result.test.uri})${` ${Util.withColor(`${result.duration}ms`, Util.colorGray)}`}\\n`);\n } else if (result.skipped) {\n skipped++;\n stdout.write(`${LogSymbols.info} ${result.test.name} (${result.test.uri})\\n`);\n } else {\n failedTests.push(result);\n stdout.write(`${LogSymbols.error} ${result.test.name} (${result.test.uri})\\n`);\n }\n }\n\n if (!compact) {\n for (const result of failedTests) {\n stdout.write(`\n${LogSymbols.error} ${Util.withColor(result.test.name, Util.colorRed)}\n ${result.test.comment || ''}\n ${'test' in result.error ? result.error : result.error.stack}\n ${Util.withColor(`More info: ${result.test.uri}`, Util.colorBlue)}\n\n`);\n }\n }\n\n const skippedString = skipped ? ` (skipped ${skipped})` : '';\n success += skipped;\n if (success === results.length) {\n stdout.write(`${LogSymbols.success} ${success} / ${results.length} tests succeeded!${skippedString}\\n`);\n } else {\n stdout.write(`${LogSymbols.error} ${success} / ${results.length} tests succeeded!${skippedString}\\n`);\n }\n }\n\n /**\n * Convert test results to an RDF stream.\n * @param {ITestResult[]} results Test results.\n * @param {IEarlProperties} properties EARL properties.\n * @param {Date} testDate The date at which the tests were executed.\n * @return {Stream} An RDF stream of quads.\n */\n public resultsToEarl(results: ITestResult[], properties: IEarlProperties, testDate: Date): RDF.Stream {\n // eslint-disable-next-line ts/no-require-imports, ts/no-var-requires\n const p = require('./prefixes.json');\n const dateRaw = testDate.toISOString();\n const date = `\"${dateRaw}\"^^${p.xsd}dateTime`;\n const quads: RDF.Quad[] = [];\n\n // Describe report\n const report = properties.reportUri || '';\n quads.push(DF.quad(DF.namedNode(report), DF.namedNode(`${p.foaf}primaryTopic`), DF.namedNode(properties.applicationUri)));\n quads.push(DF.quad(DF.namedNode(report), DF.namedNode(`${p.dc}issued`), DF.literal(testDate.toISOString(), DF.namedNode(`${p.xsd}dateTime`))));\n for (const author of properties.authors) {\n quads.push(DF.quad(DF.namedNode(report), DF.namedNode(`${p.foaf}maker`), DF.namedNode(author.uri)));\n }\n\n // Describe application\n const app = properties.applicationUri;\n quads.push(quad(app, `${p.rdf}type`, `${p.earl}Software`));\n quads.push(quad(app, `${p.rdf}type`, `${p.earl}TestSubject`));\n quads.push(quad(app, `${p.rdf}type`, `${p.doap}Project`));\n quads.push(quad(app, `${p.doap}name`, `\"${properties.applicationNameFull}\"`));\n quads.push(quad(app, `${p.dc}title`, `\"${properties.applicationNameFull}\"`));\n if (properties.version) {\n quads.push(quad(app, `${p.doap}release`, '_:b_release'));\n quads.push(quad('_:b_release', `${p.doap}revision`, `\"${properties.version}\"`));\n }\n quads.push(quad(app, `${p.doap}homepage`, properties.applicationHomepageUrl));\n quads.push(quad(app, `${p.doap}license`, properties.licenseUri));\n quads.push(quad(app, `${p.doap}programming-language`, '\"JavaScript\"'));\n for (const spec of properties.specificationUris) {\n quads.push(quad(app, `${p.doap}implements`, spec));\n }\n quads.push(quad(app, `${p.doap}category`, 'http://dbpedia.org/resource/Resource_Description_Framework'));\n quads.push(quad(app, `${p.doap}download-page`, `https://npmjs.org/package/${properties.applicationNameNpm}`));\n if (properties.applicationBugsUrl) {\n quads.push(quad(app, `${p.doap}bug-database`, properties.applicationBugsUrl));\n }\n if (properties.applicationBlogUrl) {\n quads.push(quad(app, `${p.doap}blog`, properties.applicationBlogUrl));\n }\n for (const author of properties.authors) {\n quads.push(quad(app, `${p.doap}developer`, author.uri));\n quads.push(quad(app, `${p.doap}maintainer`, author.uri));\n quads.push(quad(app, `${p.doap}documenter`, author.uri));\n quads.push(quad(app, `${p.doap}maker`, author.uri));\n quads.push(quad(app, `${p.dc}creator`, author.uri));\n }\n quads.push(quad(app, `${p.dc}description`, `\"${properties.applicationDescription}\"@en`));\n quads.push(quad(app, `${p.doap}description`, `\"${properties.applicationDescription}\"@en`));\n\n // Describe authors\n for (const author of properties.authors) {\n quads.push(quad(author.uri, `${p.rdf}type`, `${p.foaf}Person`));\n quads.push(quad(author.uri, `${p.rdf}type`, `${p.earl}Assertor`));\n if (author.name) {\n quads.push(quad(author.uri, `${p.foaf}name`, `\"${author.name}\"`));\n }\n if (author.homepage) {\n quads.push(quad(author.uri, `${p.foaf}homepage`, author.homepage));\n }\n if (author.primaryTopic) {\n quads.push(quad(author.uri, `${p.foaf}primaryTopicOf`, author.primaryTopic));\n }\n }\n\n // Describe test results\n let id = 0;\n for (const result of results) {\n const testUri = result.test.uri;\n quads.push(quad(testUri, `${p.rdf}type`, `${p.earl}TestCriterion`));\n quads.push(quad(testUri, `${p.rdf}type`, `${p.earl}TestCase`));\n quads.push(quad(testUri, `${p.dc}title`, `\"${result.test.name}\"`));\n if (result.test.comment) {\n quads.push(quad(testUri, `${p.dc}description`, `\"${result.test.comment}\"`));\n }\n quads.push(quad(testUri, `${p.earl}assertions`, `_:assertions${id}`));\n quads.push(quad(`_:assertions${id}`, `${p.rdf}first`, `_:assertion${id}`));\n quads.push(quad(`_:assertions${id}`, `${p.rdf}rest`, `${p.rdf}nil`));\n quads.push(quad(`_:assertion${id}`, `${p.rdf}type`, `${p.earl}Assertion`));\n for (const author of properties.authors) {\n quads.push(quad(`_:assertion${id}`, `${p.earl}assertedBy`, author.uri));\n }\n quads.push(quad(`_:assertion${id}`, `${p.earl}test`, testUri));\n quads.push(quad(`_:assertion${id}`, `${p.earl}subject`, app));\n quads.push(quad(`_:assertion${id}`, `${p.earl}mode`, `${p.earl}automatic`));\n quads.push(quad(`_:assertion${id}`, `${p.earl}result`, `_:result${id}`));\n quads.push(quad(`_:result${id}`, `${p.rdf}type`, `${p.earl}TestResult`));\n quads.push(quad(`_:result${id}`, `${p.earl}outcome`, p.earl + (result.ok ? 'passed' : (result.skipped ? 'inapplicable' : 'failed'))));\n quads.push(quad(`_:result${id}`, `${p.dc}date`, date));\n id++;\n }\n\n return streamifyArray(quads);\n }\n\n /**\n * Create an {#link IEarlProperties} data object based on package.json contents.\n * @param packageJson Package.json contents.\n * @return {IEarlProperties} A data object.\n */\n public packageJsonToEarlProperties(packageJson: any): IEarlProperties {\n return {\n applicationBugsUrl: packageJson.bugs && packageJson.bugs.url ? packageJson.bugs.url : packageJson.bugs,\n applicationDescription: packageJson.description,\n applicationHomepageUrl: packageJson.homepage,\n applicationNameFull: packageJson.name,\n applicationNameNpm: packageJson.name,\n applicationUri: packageJson.name ? `https://www.npmjs.com/package/${packageJson.name}/` : null,\n authors: [\n {\n homepage: null,\n name: packageJson.author,\n uri: `https://www.npmjs.com/package/${packageJson.name}/#author`,\n },\n ],\n licenseUri: packageJson.license ? Util.licenseToUri(packageJson.license) : null,\n reportUri: null,\n specificationUris: [],\n version: packageJson.version,\n };\n }\n}\n\nexport interface IEarlProperties {\n reportUri: string;\n authors: IAuthor[];\n licenseUri: string;\n applicationUri: string;\n applicationHomepageUrl: string;\n applicationBugsUrl?: string;\n applicationBlogUrl?: string;\n applicationNameFull: string;\n applicationNameNpm: string;\n applicationDescription: string;\n specificationUris: string[];\n version?: string;\n}\n\nexport interface IAuthor {\n uri: string;\n name?: string;\n homepage?: string;\n primaryTopic?: string;\n}\n\nexport interface ITestResult extends ITestResultOverride {\n test: ITestCase<any>;\n ok: boolean;\n error?: Error;\n skipped?: boolean;\n}\n\nexport interface ITestResultOverride {\n duration?: number; // In ms\n}\n"]}
@@ -25,6 +25,7 @@
25
25
  "resultCardinality": "mf:resultCardinality",
26
26
  "requires": "mf:requires",
27
27
  "expectedStatus": "mf:expectedStatus",
28
+ "expectedLocation": "mf:expectedLocation",
28
29
  "expectedFormat": "mf:expectedFormat",
29
30
  "expectedBoolean": "mf:expectedBoolean",
30
31
 
@@ -44,6 +45,7 @@
44
45
 
45
46
  "ht": "http://www.w3.org/2011/http#",
46
47
  "httpRequests": "ht:requests",
48
+ "httpConnectionAuthority": "ht:connectionAuthority",
47
49
  "httpAbsolutePath": "ht:absolutePath",
48
50
  "httpMethodName": "ht:methodName",
49
51
  "httpHeaders": "ht:headers",
@@ -8,13 +8,13 @@ const TestCaseJsonLdToRdfNegative_1 = require("./rdfsyntax/jsonld/TestCaseJsonLd
8
8
  const TestCaseEval_1 = require("./rdfsyntax/TestCaseEval");
9
9
  const TestCaseSyntax_1 = require("./rdfsyntax/TestCaseSyntax");
10
10
  const TestCaseCsvResultFormat_1 = require("./sparql/TestCaseCsvResultFormat");
11
+ const TestCaseGraphStoreProtocol_1 = require("./sparql/TestCaseGraphStoreProtocol");
11
12
  const TestCaseNegativeSyntax_1 = require("./sparql/TestCaseNegativeSyntax");
12
13
  const TestCasePositiveSyntax_1 = require("./sparql/TestCasePositiveSyntax");
13
14
  const TestCaseProtocol_1 = require("./sparql/TestCaseProtocol");
14
15
  const TestCaseQueryEvaluation_1 = require("./sparql/TestCaseQueryEvaluation");
15
16
  const TestCaseServiceDescription_1 = require("./sparql/TestCaseServiceDescription");
16
17
  const TestCaseUpdateEvaluation_1 = require("./sparql/TestCaseUpdateEvaluation");
17
- const TestCaseUnsupported_1 = require("./TestCaseUnsupported");
18
18
  module.exports = {
19
19
  // SPARQL 1.0, SPARQL 1.1 test suite
20
20
  'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#NegativeSyntaxTest': new TestCaseNegativeSyntax_1.TestCaseNegativeSyntaxHandler(),
@@ -31,7 +31,7 @@ module.exports = {
31
31
  'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#CSVResultFormatTest': new TestCaseCsvResultFormat_1.TestCaseCsvResultFormatHandler(),
32
32
  'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#ServiceDescriptionTest': new TestCaseServiceDescription_1.TestCaseServiceDescriptionHandler(),
33
33
  'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#ProtocolTest': new TestCaseProtocol_1.TestCaseProtocolHandler(),
34
- 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#GraphStoreProtocolTest': new TestCaseUnsupported_1.TestCaseUnsupportedHandler('sparql:GraphStoreProtocolTest'), // TODO: implement
34
+ 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#GraphStoreProtocolTest': new TestCaseGraphStoreProtocol_1.TestCaseGraphStoreProtocolHandler(),
35
35
  // RDF/XML test suite
36
36
  'http://www.w3.org/ns/rdftest#TestXMLEval': new TestCaseEval_1.TestCaseEvalHandler(),
37
37
  'http://www.w3.org/ns/rdftest#TestXMLNegativeSyntax': new TestCaseSyntax_1.TestCaseSyntaxHandler(false),
@@ -1 +1 @@
1
- {"version":3,"file":"TestCaseHandlers.js","sourceRoot":"","sources":["TestCaseHandlers.ts"],"names":[],"mappings":";;AAAA,oFAAwF;AACxF,oGAAwG;AACxG,kFAAsF;AACtF,gFAAoF;AACpF,gGAAoG;AACpG,2DAA+D;AAC/D,+DAAmE;AACnE,8EAAkF;AAClF,4EAAgF;AAChF,4EAAgF;AAChF,gEAAoE;AACpE,8EAAkF;AAClF,oFAAwF;AACxF,gFAAoF;AACpF,+DAAmE;AAEnE,MAAM,CAAC,OAAO,GAAG;IACf,oCAAoC;IACpC,6EAA6E,EAC3E,IAAI,sDAA6B,EAAE;IACrC,6EAA6E,EAC3E,IAAI,sDAA6B,EAAE;IACrC,mFAAmF,EACjF,IAAI,sDAA6B,EAAE;IACrC,mFAAmF,EACjF,IAAI,sDAA6B,EAAE;IACrC,8EAA8E,EAC5E,IAAI,wDAA8B,EAAE;IAEtC,wBAAwB;IACxB,+EAA+E,EAC7E,IAAI,sDAA6B,EAAE;IACrC,+EAA+E,EAC7E,IAAI,sDAA6B,EAAE;IACrC,qFAAqF,EACnF,IAAI,sDAA6B,EAAE;IACrC,qFAAqF,EACnF,IAAI,sDAA6B,EAAE;IACrC,+EAA+E,EAC7E,IAAI,0DAA+B,EAAE;IACvC,8EAA8E,EAC5E,IAAI,wDAA8B,EAAE;IACtC,iFAAiF,EAC/E,IAAI,8DAAiC,EAAE;IACzC,uEAAuE,EACrE,IAAI,0CAAuB,EAAE;IAC/B,iFAAiF,EAC/E,IAAI,gDAA0B,CAAC,+BAA+B,CAAC,EAAE,kBAAkB;IAErF,qBAAqB;IACrB,0CAA0C,EACxC,IAAI,kCAAmB,EAAE;IAC3B,oDAAoD,EAClD,IAAI,sCAAqB,CAAC,KAAK,CAAC;IAElC,uBAAuB;IACvB,yDAAyD,EACvD,IAAI,sCAAq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,EAC3D,IAAI,sCAAqB,CAAC,KAAK,CAAC;IAClC,mDAAmD,EACjD,IAAI,kCAAmB,EAAE;CAE5B,CAAC","sourcesContent":["import { TestCaseJsonLdFromRdfHandler } from './rdfsyntax/jsonld/TestCaseJsonLdFromRdf';\nimport { TestCaseJsonLdFromRdfNegativeHandler } from './rdfsyntax/jsonld/TestCaseJsonLdFromRdfNegative';\nimport { TestCaseJsonLdSyntaxHandler } from './rdfsyntax/jsonld/TestCaseJsonLdSyntax';\nimport { TestCaseJsonLdToRdfHandler } from './rdfsyntax/jsonld/TestCaseJsonLdToRdf';\nimport { TestCaseJsonLdToRdfNegativeHandler } from './rdfsyntax/jsonld/TestCaseJsonLdToRdfNegative';\nimport { TestCaseEvalHandler } from './rdfsyntax/TestCaseEval';\nimport { TestCaseSyntaxHandler } from './rdfsyntax/TestCaseSyntax';\nimport { TestCaseCsvResultFormatHandler } from './sparql/TestCaseCsvResultFormat';\nimport { TestCaseNegativeSyntaxHandler } from './sparql/TestCaseNegativeSyntax';\nimport { TestCasePositiveSyntaxHandler } from './sparql/TestCasePositiveSyntax';\nimport { TestCaseProtocolHandler } from './sparql/TestCaseProtocol';\nimport { TestCaseQueryEvaluationHandler } from './sparql/TestCaseQueryEvaluation';\nimport { TestCaseServiceDescriptionHandler } from './sparql/TestCaseServiceDescription';\nimport { TestCaseUpdateEvaluationHandler } from './sparql/TestCaseUpdateEvaluation';\nimport { TestCaseUnsupportedHandler } from './TestCaseUnsupported';\n\nmodule.exports = {\n // SPARQL 1.0, SPARQL 1.1 test suite\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#NegativeSyntaxTest':\n new TestCaseNegativeSyntaxHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#PositiveSyntaxTest':\n new TestCasePositiveSyntaxHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#NegativeUpdateSyntaxTest':\n new TestCaseNegativeSyntaxHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#PositiveUpdateSyntaxTest':\n new TestCasePositiveSyntaxHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#QueryEvaluationTest':\n new TestCaseQueryEvaluationHandler(),\n\n // SPARQL 1.1 test suite\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#NegativeSyntaxTest11':\n new TestCaseNegativeSyntaxHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#PositiveSyntaxTest11':\n new TestCasePositiveSyntaxHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#NegativeUpdateSyntaxTest11':\n new TestCaseNegativeSyntaxHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#PositiveUpdateSyntaxTest11':\n new TestCasePositiveSyntaxHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#UpdateEvaluationTest':\n new TestCaseUpdateEvaluationHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#CSVResultFormatTest':\n new TestCaseCsvResultFormatHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#ServiceDescriptionTest':\n new TestCaseServiceDescriptionHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#ProtocolTest':\n new TestCaseProtocolHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#GraphStoreProtocolTest':\n new TestCaseUnsupportedHandler('sparql:GraphStoreProtocolTest'), // TODO: implement\n\n // RDF/XML test suite\n 'http://www.w3.org/ns/rdftest#TestXMLEval':\n new TestCaseEvalHandler(),\n 'http://www.w3.org/ns/rdftest#TestXMLNegativeSyntax':\n new TestCaseSyntaxHandler(false),\n\n // N-Triples test suite\n 'http://www.w3.org/ns/rdftest#TestNTriplesPositiveSyntax':\n new TestCaseSyntaxHandler(true),\n 'http://www.w3.org/ns/rdftest#TestNTriplesNegativeSyntax':\n new TestCaseSyntaxHandler(false),\n\n // N-Quads test suite\n 'http://www.w3.org/ns/rdftest#TestNQuadsPositiveSyntax':\n new TestCaseSyntaxHandler(true),\n 'http://www.w3.org/ns/rdftest#TestNQuadsNegativeSyntax':\n new TestCaseSyntaxHandler(false),\n\n // Turtle test suite\n 'http://www.w3.org/ns/rdftest#TestTurtleEval':\n new TestCaseEvalHandler(),\n 'http://www.w3.org/ns/rdftest#TestTurtlePositiveSyntax':\n new TestCaseSyntaxHandler(true),\n 'http://www.w3.org/ns/rdftest#TestTurtleNegativeSyntax':\n new TestCaseSyntaxHandler(false),\n 'http://www.w3.org/ns/rdftest#TestTurtleNegativeEval':\n new TestCaseSyntaxHandler(false),\n\n // TriG test suite\n 'http://www.w3.org/ns/rdftest#TestTrigEval':\n new TestCaseEvalHandler(),\n 'http://www.w3.org/ns/rdftest#TestTrigPositiveSyntax':\n new TestCaseSyntaxHandler(true),\n 'http://www.w3.org/ns/rdftest#TestTrigNegativeSyntax':\n new TestCaseSyntaxHandler(false),\n 'http://www.w3.org/ns/rdftest#TestTrigNegativeEval':\n new TestCaseSyntaxHandler(false),\n\n // JSON-LD test suite\n 'https://w3c.github.io/json-ld-api/tests/vocab#ToRDFTest https://w3c.github.io/json-ld-api/tests/vocab#PositiveEvaluationTest':\n new TestCaseJsonLdToRdfHandler(),\n 'https://w3c.github.io/json-ld-api/tests/vocab#ToRDFTest https://w3c.github.io/json-ld-api/tests/vocab#PositiveSyntaxTest':\n new TestCaseJsonLdSyntaxHandler(true),\n 'https://w3c.github.io/json-ld-api/tests/vocab#ToRDFTest https://w3c.github.io/json-ld-api/tests/vocab#NegativeEvaluationTest':\n new TestCaseJsonLdToRdfNegativeHandler(),\n 'https://w3c.github.io/json-ld-api/tests/vocab#FromRDFTest https://w3c.github.io/json-ld-api/tests/vocab#PositiveEvaluationTest':\n new TestCaseJsonLdFromRdfHandler(),\n 'https://w3c.github.io/json-ld-api/tests/vocab#FromRDFTest https://w3c.github.io/json-ld-api/tests/vocab#NegativeEvaluationTest':\n new TestCaseJsonLdFromRdfNegativeHandler(),\n\n // RDFa test suite\n 'http://rdfa.info/vocabs/rdfa-test#PositiveEvaluationTest':\n new TestCaseEvalHandler(),\n 'http://rdfa.info/vocabs/rdfa-test#NegativeEvaluationTest':\n new TestCaseSyntaxHandler(true), // RDFa test suite never expect errors, just empty documents\n\n // Microdata-RDF test suite\n 'http://www.w3.org/ns/rdftest#TestMicrodataEval':\n new TestCaseEvalHandler({ normalizeUrl: true }),\n 'http://www.w3.org/ns/rdftest#TestMicrodataNegativeSyntax':\n new TestCaseSyntaxHandler(true), // Microdata-RDF test suite never expect errors, just empty documents\n\n // N3 test suite\n 'https://w3c.github.io/N3/tests/test.n3#TestN3PositiveSyntax':\n new TestCaseSyntaxHandler(true),\n 'https://w3c.github.io/N3/tests/test.n3#TestN3NegativeSyntax':\n new TestCaseSyntaxHandler(false),\n 'https://w3c.github.io/N3/tests/test.n3#TestN3Eval':\n new TestCaseEvalHandler(),\n\n};\n"]}
1
+ {"version":3,"file":"TestCaseHandlers.js","sourceRoot":"","sources":["TestCaseHandlers.ts"],"names":[],"mappings":";;AAAA,oFAAwF;AACxF,oGAAwG;AACxG,kFAAsF;AACtF,gFAAoF;AACpF,gGAAoG;AACpG,2DAA+D;AAC/D,+DAAmE;AACnE,8EAAkF;AAClF,oFAAwF;AACxF,4EAAgF;AAChF,4EAAgF;AAChF,gEAAoE;AACpE,8EAAkF;AAClF,oFAAwF;AACxF,gFAAoF;AAEpF,MAAM,CAAC,OAAO,GAAG;IACf,oCAAoC;IACpC,6EAA6E,EAC3E,IAAI,sDAA6B,EAAE;IACrC,6EAA6E,EAC3E,IAAI,sDAA6B,EAAE;IACrC,mFAAmF,EACjF,IAAI,sDAA6B,EAAE;IACrC,mFAAmF,EACjF,IAAI,sDAA6B,EAAE;IACrC,8EAA8E,EAC5E,IAAI,wDAA8B,EAAE;IAEtC,wBAAwB;IACxB,+EAA+E,EAC7E,IAAI,sDAA6B,EAAE;IACrC,+EAA+E,EAC7E,IAAI,sDAA6B,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;IAC1C,gIAAgI,EAC9H,IAAI,oDAA4B,EAAE;IACpC,gIAAgI,EAC9H,IAAI,oEAAoC,EAAE;IAE5C,kBAAkB;IAClB,0DAA0D,EACxD,IAAI,kCAAmB,EAAE;IAC3B,0DAA0D,EACxD,IAAI,sCAAqB,CAAC,IAAI,CAAC,EAAE,4DAA4D;IAE/F,2BAA2B;IAC3B,gDAAgD,EAC9C,IAAI,kCAAmB,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;IACjD,0DAA0D,EACxD,IAAI,sCAAqB,CAAC,IAAI,CAAC,EAAE,qEAAqE;IAExG,gBAAgB;IAChB,6DAA6D,EAC3D,IAAI,sCAAqB,CAAC,IAAI,CAAC;IACjC,6DAA6D,EAC3D,IAAI,sCAAqB,CAAC,KAAK,CAAC;IAClC,mDAAmD,EACjD,IAAI,kCAAmB,EAAE;CAE5B,CAAC","sourcesContent":["import { TestCaseJsonLdFromRdfHandler } from './rdfsyntax/jsonld/TestCaseJsonLdFromRdf';\nimport { TestCaseJsonLdFromRdfNegativeHandler } from './rdfsyntax/jsonld/TestCaseJsonLdFromRdfNegative';\nimport { TestCaseJsonLdSyntaxHandler } from './rdfsyntax/jsonld/TestCaseJsonLdSyntax';\nimport { TestCaseJsonLdToRdfHandler } from './rdfsyntax/jsonld/TestCaseJsonLdToRdf';\nimport { TestCaseJsonLdToRdfNegativeHandler } from './rdfsyntax/jsonld/TestCaseJsonLdToRdfNegative';\nimport { TestCaseEvalHandler } from './rdfsyntax/TestCaseEval';\nimport { TestCaseSyntaxHandler } from './rdfsyntax/TestCaseSyntax';\nimport { TestCaseCsvResultFormatHandler } from './sparql/TestCaseCsvResultFormat';\nimport { TestCaseGraphStoreProtocolHandler } from './sparql/TestCaseGraphStoreProtocol';\nimport { TestCaseNegativeSyntaxHandler } from './sparql/TestCaseNegativeSyntax';\nimport { TestCasePositiveSyntaxHandler } from './sparql/TestCasePositiveSyntax';\nimport { TestCaseProtocolHandler } from './sparql/TestCaseProtocol';\nimport { TestCaseQueryEvaluationHandler } from './sparql/TestCaseQueryEvaluation';\nimport { TestCaseServiceDescriptionHandler } from './sparql/TestCaseServiceDescription';\nimport { TestCaseUpdateEvaluationHandler } from './sparql/TestCaseUpdateEvaluation';\n\nmodule.exports = {\n // SPARQL 1.0, SPARQL 1.1 test suite\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#NegativeSyntaxTest':\n new TestCaseNegativeSyntaxHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#PositiveSyntaxTest':\n new TestCasePositiveSyntaxHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#NegativeUpdateSyntaxTest':\n new TestCaseNegativeSyntaxHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#PositiveUpdateSyntaxTest':\n new TestCasePositiveSyntaxHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#QueryEvaluationTest':\n new TestCaseQueryEvaluationHandler(),\n\n // SPARQL 1.1 test suite\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#NegativeSyntaxTest11':\n new TestCaseNegativeSyntaxHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#PositiveSyntaxTest11':\n new TestCasePositiveSyntaxHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#NegativeUpdateSyntaxTest11':\n new TestCaseNegativeSyntaxHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#PositiveUpdateSyntaxTest11':\n new TestCasePositiveSyntaxHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#UpdateEvaluationTest':\n new TestCaseUpdateEvaluationHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#CSVResultFormatTest':\n new TestCaseCsvResultFormatHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#ServiceDescriptionTest':\n new TestCaseServiceDescriptionHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#ProtocolTest':\n new TestCaseProtocolHandler(),\n 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#GraphStoreProtocolTest':\n new TestCaseGraphStoreProtocolHandler(),\n\n // RDF/XML test suite\n 'http://www.w3.org/ns/rdftest#TestXMLEval':\n new TestCaseEvalHandler(),\n 'http://www.w3.org/ns/rdftest#TestXMLNegativeSyntax':\n new TestCaseSyntaxHandler(false),\n\n // N-Triples test suite\n 'http://www.w3.org/ns/rdftest#TestNTriplesPositiveSyntax':\n new TestCaseSyntaxHandler(true),\n 'http://www.w3.org/ns/rdftest#TestNTriplesNegativeSyntax':\n new TestCaseSyntaxHandler(false),\n\n // N-Quads test suite\n 'http://www.w3.org/ns/rdftest#TestNQuadsPositiveSyntax':\n new TestCaseSyntaxHandler(true),\n 'http://www.w3.org/ns/rdftest#TestNQuadsNegativeSyntax':\n new TestCaseSyntaxHandler(false),\n\n // Turtle test suite\n 'http://www.w3.org/ns/rdftest#TestTurtleEval':\n new TestCaseEvalHandler(),\n 'http://www.w3.org/ns/rdftest#TestTurtlePositiveSyntax':\n new TestCaseSyntaxHandler(true),\n 'http://www.w3.org/ns/rdftest#TestTurtleNegativeSyntax':\n new TestCaseSyntaxHandler(false),\n 'http://www.w3.org/ns/rdftest#TestTurtleNegativeEval':\n new TestCaseSyntaxHandler(false),\n\n // TriG test suite\n 'http://www.w3.org/ns/rdftest#TestTrigEval':\n new TestCaseEvalHandler(),\n 'http://www.w3.org/ns/rdftest#TestTrigPositiveSyntax':\n new TestCaseSyntaxHandler(true),\n 'http://www.w3.org/ns/rdftest#TestTrigNegativeSyntax':\n new TestCaseSyntaxHandler(false),\n 'http://www.w3.org/ns/rdftest#TestTrigNegativeEval':\n new TestCaseSyntaxHandler(false),\n\n // JSON-LD test suite\n 'https://w3c.github.io/json-ld-api/tests/vocab#ToRDFTest https://w3c.github.io/json-ld-api/tests/vocab#PositiveEvaluationTest':\n new TestCaseJsonLdToRdfHandler(),\n 'https://w3c.github.io/json-ld-api/tests/vocab#ToRDFTest https://w3c.github.io/json-ld-api/tests/vocab#PositiveSyntaxTest':\n new TestCaseJsonLdSyntaxHandler(true),\n 'https://w3c.github.io/json-ld-api/tests/vocab#ToRDFTest https://w3c.github.io/json-ld-api/tests/vocab#NegativeEvaluationTest':\n new TestCaseJsonLdToRdfNegativeHandler(),\n 'https://w3c.github.io/json-ld-api/tests/vocab#FromRDFTest https://w3c.github.io/json-ld-api/tests/vocab#PositiveEvaluationTest':\n new TestCaseJsonLdFromRdfHandler(),\n 'https://w3c.github.io/json-ld-api/tests/vocab#FromRDFTest https://w3c.github.io/json-ld-api/tests/vocab#NegativeEvaluationTest':\n new TestCaseJsonLdFromRdfNegativeHandler(),\n\n // RDFa test suite\n 'http://rdfa.info/vocabs/rdfa-test#PositiveEvaluationTest':\n new TestCaseEvalHandler(),\n 'http://rdfa.info/vocabs/rdfa-test#NegativeEvaluationTest':\n new TestCaseSyntaxHandler(true), // RDFa test suite never expect errors, just empty documents\n\n // Microdata-RDF test suite\n 'http://www.w3.org/ns/rdftest#TestMicrodataEval':\n new TestCaseEvalHandler({ normalizeUrl: true }),\n 'http://www.w3.org/ns/rdftest#TestMicrodataNegativeSyntax':\n new TestCaseSyntaxHandler(true), // Microdata-RDF test suite never expect errors, just empty documents\n\n // N3 test suite\n 'https://w3c.github.io/N3/tests/test.n3#TestN3PositiveSyntax':\n new TestCaseSyntaxHandler(true),\n 'https://w3c.github.io/N3/tests/test.n3#TestN3NegativeSyntax':\n new TestCaseSyntaxHandler(false),\n 'https://w3c.github.io/N3/tests/test.n3#TestN3Eval':\n new TestCaseEvalHandler(),\n\n};\n"]}
@@ -16,6 +16,11 @@ export interface IServiceDescriptionEndpoint extends ISparqlEndpoint {
16
16
  */
17
17
  export interface IProtocolEndpoint extends ISparqlEndpoint {
18
18
  }
19
+ /**
20
+ * A running endpoint for SPARQL Graph Store Protocol conformance tests.
21
+ */
22
+ export interface IGraphStoreEndpoint extends ISparqlEndpoint {
23
+ }
19
24
  /**
20
25
  * A query engine handler.
21
26
  */
@@ -25,6 +30,7 @@ export interface IQueryEngine {
25
30
  queryResultFormat?: (data: RDF.Quad[], queryString: string, mediaType: string, options: Record<string, any>) => Promise<NodeJS.ReadableStream>;
26
31
  startServiceDescriptionEndpoint?: () => Promise<IServiceDescriptionEndpoint>;
27
32
  startProtocolEndpoint?: () => Promise<IProtocolEndpoint>;
33
+ startGraphStoreEndpoint?: () => Promise<IGraphStoreEndpoint>;
28
34
  }
29
35
  /**
30
36
  * Super type for all query result types.
@@ -1 +1 @@
1
- {"version":3,"file":"IQueryEngine.js","sourceRoot":"","sources":["IQueryEngine.ts"],"names":[],"mappings":"","sourcesContent":["import type * as RDF from '@rdfjs/types';\n\n/**\n * A running SPARQL endpoint that conformance tests are executed against.\n */\nexport interface ISparqlEndpoint {\n endpoint: string;\n close: () => Promise<void>;\n}\n\n/**\n * A running endpoint for Service Description conformance tests.\n */\nexport interface IServiceDescriptionEndpoint extends ISparqlEndpoint {}\n\n/**\n * A running endpoint for SPARQL Protocol conformance tests.\n */\nexport interface IProtocolEndpoint extends ISparqlEndpoint {}\n\n/**\n * A query engine handler.\n */\nexport interface IQueryEngine {\n parse: (queryString: string, options: Record<string, any>) => Promise<void>;\n query: (data: RDF.Quad[], queryString: string, options: Record<string, any>) => Promise<IQueryResult>;\n queryResultFormat?: (data: RDF.Quad[], queryString: string, mediaType: string, options: Record<string, any>) => Promise<NodeJS.ReadableStream>;\n startServiceDescriptionEndpoint?: () => Promise<IServiceDescriptionEndpoint>;\n startProtocolEndpoint?: () => Promise<IProtocolEndpoint>;\n}\n\n/**\n * Super type for all query result types.\n */\nexport type IQueryResult = IQueryResultBoolean | IQueryResultQuads | IQueryResultBindings;\n\n/**\n * Holds a boolean query result.\n */\nexport interface IQueryResultBoolean {\n type: 'boolean';\n value: boolean;\n equals: (that: IQueryResult, laxCardinality?: boolean) => boolean;\n toString: () => string;\n}\n\n/**\n * Holds quad-based query results.\n */\nexport interface IQueryResultQuads {\n type: 'quads';\n value: RDF.Quad[];\n equals: (that: IQueryResult, laxCardinality?: boolean) => boolean;\n toString: () => string;\n}\n\n/**\n * Holds bindings-based query results.\n */\nexport interface IQueryResultBindings {\n type: 'bindings';\n variables: string[];\n value: Record<string, RDF.Term>[];\n checkOrder: boolean;\n equals: (that: IQueryResult, laxCardinality?: boolean) => boolean;\n toString: () => string;\n}\n"]}
1
+ {"version":3,"file":"IQueryEngine.js","sourceRoot":"","sources":["IQueryEngine.ts"],"names":[],"mappings":"","sourcesContent":["import type * as RDF from '@rdfjs/types';\n\n/**\n * A running SPARQL endpoint that conformance tests are executed against.\n */\nexport interface ISparqlEndpoint {\n endpoint: string;\n close: () => Promise<void>;\n}\n\n/**\n * A running endpoint for Service Description conformance tests.\n */\nexport interface IServiceDescriptionEndpoint extends ISparqlEndpoint {}\n\n/**\n * A running endpoint for SPARQL Protocol conformance tests.\n */\nexport interface IProtocolEndpoint extends ISparqlEndpoint {}\n\n/**\n * A running endpoint for SPARQL Graph Store Protocol conformance tests.\n */\nexport interface IGraphStoreEndpoint extends ISparqlEndpoint {}\n\n/**\n * A query engine handler.\n */\nexport interface IQueryEngine {\n parse: (queryString: string, options: Record<string, any>) => Promise<void>;\n query: (data: RDF.Quad[], queryString: string, options: Record<string, any>) => Promise<IQueryResult>;\n queryResultFormat?: (data: RDF.Quad[], queryString: string, mediaType: string, options: Record<string, any>) => Promise<NodeJS.ReadableStream>;\n startServiceDescriptionEndpoint?: () => Promise<IServiceDescriptionEndpoint>;\n startProtocolEndpoint?: () => Promise<IProtocolEndpoint>;\n startGraphStoreEndpoint?: () => Promise<IGraphStoreEndpoint>;\n}\n\n/**\n * Super type for all query result types.\n */\nexport type IQueryResult = IQueryResultBoolean | IQueryResultQuads | IQueryResultBindings;\n\n/**\n * Holds a boolean query result.\n */\nexport interface IQueryResultBoolean {\n type: 'boolean';\n value: boolean;\n equals: (that: IQueryResult, laxCardinality?: boolean) => boolean;\n toString: () => string;\n}\n\n/**\n * Holds quad-based query results.\n */\nexport interface IQueryResultQuads {\n type: 'quads';\n value: RDF.Quad[];\n equals: (that: IQueryResult, laxCardinality?: boolean) => boolean;\n toString: () => string;\n}\n\n/**\n * Holds bindings-based query results.\n */\nexport interface IQueryResultBindings {\n type: 'bindings';\n variables: string[];\n value: Record<string, RDF.Term>[];\n checkOrder: boolean;\n equals: (that: IQueryResult, laxCardinality?: boolean) => boolean;\n toString: () => string;\n}\n"]}
@@ -0,0 +1,152 @@
1
+ import type * as RDF from '@rdfjs/types';
2
+ import type { Resource } from 'rdf-object';
3
+ import type { ITestCaseData } from '../ITestCase';
4
+ import type { ITestCaseHandler } from '../ITestCaseHandler';
5
+ import type { IQueryEngine } from './IQueryEngine';
6
+ import type { ITestCaseSparql } from './ITestCaseSparql';
7
+ import type { IHttpContent } from './TestCaseProtocol';
8
+ /**
9
+ * A single HTTP request of a graph store protocol test, together with its expected response.
10
+ */
11
+ export interface IGraphStoreRequest {
12
+ absolutePath: string;
13
+ method: string;
14
+ headers: [string, string][];
15
+ body?: IHttpContent;
16
+ expectedStatuses: number[];
17
+ expectedStatusClasses: number[];
18
+ expectedLocation?: string;
19
+ expectedHeaders: [string, string][];
20
+ expectedBody?: IHttpContent;
21
+ }
22
+ export interface IGraphStoreProtocolTestOptions {
23
+ /** The SPARQL Graph Store Protocol endpoint that the requests are sent to. */
24
+ graphStoreEndpoint?: string;
25
+ }
26
+ export interface ITestCaseGraphStoreProtocolProps {
27
+ requests: IGraphStoreRequest[];
28
+ requiredFeatures: string[];
29
+ }
30
+ /**
31
+ * Test case handler for http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#GraphStoreProtocolTest.
32
+ */
33
+ export declare class TestCaseGraphStoreProtocolHandler implements ITestCaseHandler<TestCaseGraphStoreProtocol> {
34
+ /**
35
+ * Interpret the ht:headers of a ht:Request or ht:Response.
36
+ * @param resource A ht:Request or ht:Response resource.
37
+ */
38
+ static getHeaders(resource: Resource): [string, string][];
39
+ /**
40
+ * Interpret a cnt:ContentAsText resource.
41
+ * @param content A cnt:ContentAsText resource.
42
+ */
43
+ static getContent(content: Resource): IHttpContent;
44
+ /**
45
+ * Interpret a mf:expectedStatus value as either a concrete status code or a status code class.
46
+ * @param status A mf:expectedStatus value.
47
+ * @param uri The URI of the test case the status belongs to, used for error reporting.
48
+ */
49
+ static getExpectedStatus(status: string, uri: string): {
50
+ status?: number;
51
+ statusClass?: number;
52
+ };
53
+ /**
54
+ * Interpret a single ht:Request resource, together with the ht:Response it is expected to produce.
55
+ * @param request A ht:Request resource.
56
+ * @param uri The URI of the test case the request belongs to, used for error reporting.
57
+ */
58
+ static getRequest(request: Resource, uri: string): IGraphStoreRequest;
59
+ resourceToTestCase(resource: Resource, testCaseData: ITestCaseData): Promise<TestCaseGraphStoreProtocol>;
60
+ }
61
+ export declare class TestCaseGraphStoreProtocol implements ITestCaseSparql {
62
+ readonly type = "sparql";
63
+ readonly approval: string;
64
+ readonly approvedBy: string;
65
+ readonly comment: string;
66
+ readonly types: string[];
67
+ readonly name: string;
68
+ readonly uri: string;
69
+ readonly requests: IGraphStoreRequest[];
70
+ readonly requiredFeatures: string[];
71
+ constructor(testCaseData: ITestCaseData, props: ITestCaseGraphStoreProtocolProps);
72
+ /**
73
+ * Determine the endpoint that the graph store protocol requests must be sent to.
74
+ * @param injectArguments The custom engine options.
75
+ */
76
+ static getEndpoint(injectArguments: IGraphStoreProtocolTestOptions): string;
77
+ /**
78
+ * Replace the manifest path prefix of the given request path with the path of the endpoint under test.
79
+ * @param endpoint The endpoint under test.
80
+ * @param absolutePath A ht:absolutePath value.
81
+ */
82
+ static resolveRequestUrl(endpoint: string, absolutePath: string): string;
83
+ /**
84
+ * Determine the class of the given HTTP status code, e.g. 2 for 204.
85
+ * @param status An HTTP status code.
86
+ */
87
+ static statusClass(status: number): number;
88
+ /**
89
+ * Determine the media type of a content type header value, without any of its parameters.
90
+ * @param contentType A content type header value.
91
+ */
92
+ static mediaType(contentType: string): string;
93
+ /**
94
+ * Replace all template variables in the given string with the values they have been bound to.
95
+ * @param value The string to fill the template variables in.
96
+ * @param templates The values of the template variables, indexed by variable.
97
+ */
98
+ static fillTemplates(value: string, templates: Record<string, string>): string;
99
+ test(_engine: IQueryEngine, injectArguments: IGraphStoreProtocolTestOptions): Promise<void>;
100
+ /**
101
+ * Delete every graph that this test case addresses, so that it starts from a known state.
102
+ * The responses are ignored, as the graphs are not required to exist.
103
+ * @param endpoint The endpoint under test.
104
+ */
105
+ protected clearGraphs(endpoint: string): Promise<void>;
106
+ /**
107
+ * Send a single request of this test case to the endpoint, and validate its response.
108
+ * @param endpoint The endpoint under test.
109
+ * @param request The request to send.
110
+ * @param templates The template variables bound by the previous requests, extended by this request.
111
+ */
112
+ protected testRequest(endpoint: string, request: IGraphStoreRequest, templates: Record<string, string>): Promise<void>;
113
+ /**
114
+ * Validate that the status of a response is one of the statuses that the manifest expects.
115
+ * @param request The request that was sent.
116
+ * @param url The URL the request was sent to.
117
+ * @param status The status of the response.
118
+ * @param body The body of the response.
119
+ */
120
+ protected validateStatus(request: IGraphStoreRequest, url: string, status: number, body: string): void;
121
+ /**
122
+ * Determine the location that a response points to, which subsequent requests in this test case refer to.
123
+ * @param request The request that was sent.
124
+ * @param url The URL the request was sent to.
125
+ * @param response The response that was received.
126
+ */
127
+ static getLocation(request: IGraphStoreRequest, url: string, response: Response): string;
128
+ /**
129
+ * Validate that the headers of a response match the headers that the manifest expects.
130
+ * Content type parameters such as the character encoding are not compared.
131
+ * @param request The request that was sent.
132
+ * @param url The URL the request was sent to.
133
+ * @param response The response that was received.
134
+ */
135
+ static validateHeaders(request: IGraphStoreRequest, url: string, response: Response): void;
136
+ /**
137
+ * Validate that the body of a response is isomorphic to the graph that the manifest expects.
138
+ * @param request The request that was sent.
139
+ * @param url The URL the request was sent to.
140
+ * @param response The response that was received.
141
+ * @param body The body of the response.
142
+ */
143
+ static validateBody(request: IGraphStoreRequest, url: string, response: Response, body: string): Promise<void>;
144
+ /**
145
+ * Parse an RDF graph that was sent over HTTP.
146
+ * @param contentType The content type the graph is serialized in.
147
+ * @param url The URL that the graph is a representation of, which relative IRIs are resolved against.
148
+ * @param body The serialized graph.
149
+ * @param label The kind of body that is being parsed, used for error reporting.
150
+ */
151
+ static parseBody(contentType: string, url: string, body: string, label: string): Promise<RDF.Quad[]>;
152
+ }