Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

expect-mocha-snapshot

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expect-mocha-snapshot - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

index.js
const jestSnapshot = require("jest-snapshot");
const expect = require("expect");
module.exports = function toMatchSnapshot(mochaContext) {
module.exports = function toMatchSnapshot(mochaContext, name) {
if (!mochaContext || !mochaContext.test) {

@@ -23,3 +23,3 @@ throw new Error(

const result = matcher(this.actual);
const result = matcher(this.actual, name);
snapshotState.save();

@@ -26,0 +26,0 @@

{
"name": "expect-mocha-snapshot",
"version": "1.0.0",
"version": "1.0.1",
"peerDependencies": {

@@ -5,0 +5,0 @@ "expect": "1.20.x"

@@ -17,4 +17,4 @@ # expect-mocha-snapshot

describe("foo", () => {
it("matches the snapshot", () => {
describe("foo", function() {
it("matches the snapshot", function() {
expect({ foo: "bar" }).toMatchSnapshot(this);

@@ -21,0 +21,0 @@ });

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