The `json-ld-test-suite` npm package provides a snapshot of the official JSON-LD Conformance Test Suite, designed to verify the compliance of JSON-LD processors against the JSON-LD 1.0 and 1.1 specifications. While this specific npm package (version 1.0.1) was last published over eight years ago and is effectively abandoned, the underlying JSON-LD Test Suite on GitHub (json-ld/json-ld.org) remains actively maintained and updated by the JSON-LD community. This suite is crucial for implementers, offering test cases for operations such as compaction, expansion, framing, normalization, and RDF conversion. It differentiates itself by being the authoritative W3C test suite, essential for ensuring interoperability and specification adherence across different JSON-LD processor implementations, though consumers of *this npm package* should be aware of its static nature.
npm install json-ld-test-suiteVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to programmatically load the `json-ld-test-suite` manifest and individual test files from the file system, typically for building a conformance testing harness. This snippet uses Node.js `fs` and `path` modules to read JSON-LD and SPARQL files as raw data.
For the latest test suite data, clone the git repository directly: `git clone git://github.com/json-ld/json-ld.org.git` or use a different, more current distribution of the JSON-LD test suite.
Before running a test, inspect its `processingMode` property. If present, ensure your processor's mode matches or skip the test if incompatible. If `processingMode` is absent, the test is generally compatible with both 1.0 and 1.1.
If encountering unexpected test failures that are not due to your processor, check the upstream `json-ld/json-ld.org` repository for recent changes, bug reports, or contact the JSON-LD mailing list (public-linked-json@w3.org) for clarification.
Use the correct full path to the JSON file: `import manifest from 'json-ld-test-suite/tests/manifest.jsonld'` (ESM) or `const manifest = require('json-ld-test-suite/tests/manifest.jsonld')` (CJS).Ensure you are targeting actual JSON-LD (`.jsonld`) files for `JSON.parse`. For `.sparql` files, read them as plain text/strings. For example, using a raw import query parameter in ESM (`import query from './my.sparql?raw'`).
No dependency data recorded yet.