npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

json-ld-test-suite

v1.0.1

Published

JSON-LD Conformance Test Suite

Downloads

5

Readme

Introduction

The JSON-LD Test Suite is a set of tests that can be used to verify JSON-LD Processor conformance to the set of specifications that constitute JSON-LD. The goal of the suite is to provide an easy and comprehensive JSON-LD testing solution for developers creating JSON-LD Processors.

Design

Tests are defined into compact, expand, flatten, frame, normalize, and rdf sections:

  • compact tests have input, expected and context documents. The expected results can be compared using JSON object comparison with the processor output.
  • expand tests have input and expected documents. The expected results can be compared using JSON object comparison with the processor output.
  • frame tests have input, frame and expected documents. The expected results can be compared using JSON object comparison with the processor output.
  • normalize tests have input and expected documents. The expected results can be compared using string comparison with the processor output.
  • rdf tests have input and sparql documents. The results are tested by performing the RDF conversion and using this as the default document for an ASK query contained within the sparql document using a SPARQL endpoint. The end result is a yes/no on whether the expected triples were extracted by the JSON-LD processor.

Unless processingMode is set explicitly in a test entry, processingMode is compatible with both json-ld-1.0 and json-ld-1.1. Otherwise, a JSON-LD 1.0 processor should not run tests marked json-ld-1.1 and a JSON-LD 1.1 processor should not run tests marked json-ld-1.0.

Contributing

If you would like to contribute a new test or a fix to an existing test, please follow these steps:

  1. Notify the JSON-LD mailing list, [email protected], that you will be creating a new test or fix and the purpose of the change.
  2. Clone the git repository: git://github.com/json-ld/json-ld.org.git
  3. Make your changes and submit them via github, or via a 'git format-patch' to the JSON-LD mailing list.

Optionally, you can ask for direct access to the repository and may make changes directly to the JSON-LD Test Suite source code. All updates to the test suite go live on Digital Bazaar's JSON-LD Test Suite site within seconds of committing changes to github via a WebHook call.

How to Add a Unit Test

In order to add a unit test, you must follow these steps:

  1. Pick a new unit test number. For example - 250. To be consistent, please use the next available unit test number.
  2. Create a markup file in the tests/ directory with a .jsonld extension. For example: tests/rdf-250.jsonld
  3. Create a SPARQL query file in the tests/ directory with a .jsonld or .sparql extension. For example: tests/rdf-250.sparql
  4. Add your test to manifest.jsonld.

The test suite is designed to empower JSON-LD processor maintainers to create and add tests as they see fit. This may mean that the test suite may become unstable from time to time, but this approach has been taken so that the long-term goal of having a comprehensive test suite for JSON-LD can be achieved by the JSON-LD community.

Building Files

The vocab.html and vocab.jsonld files are created from vocab.ttl using with vocab_gen.rb.