New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@nikkij/jest-jsonshot

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nikkij/jest-jsonshot

Snapshot serializer that will serialize objects into JSON strings.

  • 1.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-85.71%
Maintainers
1
Weekly downloads
 
Created
Source

Build Status Greenkeeper badge codecov Maintainability Known Vulnerabilities FOSSA Status js-standard-style Conventional Commits

@nikkij/jest-JSONshot

Motivation

I like to use generate mocks for my unit tests from the output of my end-to-end tests. When data snapshots are serialized in a JSON format, it is more convenient to use when creating the mocks.

Usage

using a jest setup file:

// setup.js

require("@nikkij/jest-jsonshot")

inline testing:

// test.js
require("@nikkij/jest-jsonshot")

Typescript

Add the type definition for expect().toMatchJSONshot()

// global.d.ts
import("@nikkij/jest-jsonshot");

FAQs

Package last updated on 25 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc