Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including jest-serializer-json-ld-script with all npm packages installed. Try it out:

require("react/package.json"); // react is a peer dependency. var jestSerializerJsonLdScript = require("jest-serializer-json-ld-script")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

jest-serializer-json-ld-script v1.0.7

Serializer to correctly display JSON-LD objects in Jest snapshots


Build Status npm version Code Coverage Mentioned in Awesome Jest

Jest Snapshot serializer to better visualize React <script> elements containing LD+JSON data.


Install preset using npm:

npm install --save-dev jest-serializer-json-ld-script

or yarn:

yarn add --dev jest-serializer-json-ld-script


Configure Jest to use the serializer in jest.config.js:

module.exports = {
  snapshotSerializers: ["jest-serializer-json-ld-script"]

or package.json:

  "jest": {
    "snapshotSerializers": ["jest-serializer-json-ld-script"]

Related Packages


Copyright 2019 Kepler Sticka-Jones. Licensed ISC

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free