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

jest-serializer-path

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-serializer-path - npm Package Compare versions

Comparing version 0.1.12 to 0.1.13

65

lib/index_test.js

@@ -126,2 +126,67 @@ 'use strict'

it('handle boolean', () => {
const sut = true
expect(sut).toMatchSnapshot()
})
it('handle number', () => {
const sut = 1
expect(sut).toMatchSnapshot()
})
it('handle NaN', () => {
const sut = NaN
expect(sut).toMatchSnapshot()
})
it('handle null', () => {
const sut = null
expect(sut).toMatchSnapshot()
})
it('handle undefined', () => {
const sut = undefined
expect(sut).toMatchSnapshot()
})
it('handle date', () => {
const sut = new Date('2018-01-01')
expect(sut).toMatchSnapshot()
})
it('handle regex', () => {
const sut = new RegExp(/-/)
expect(sut).toMatchSnapshot()
})
it('handle function', () => {
const sut = function fn () {
}
expect(sut).toMatchSnapshot()
})
it('handle promise', () => {
const sut = new Promise(resolve => resolve())
expect(sut).toMatchSnapshot()
})
})

@@ -128,0 +193,0 @@

4

lib/index.js

@@ -119,5 +119,3 @@ 'use strict'

/* eslint-disable no-self-compare */
// NaN is the only JS value which never equals itself
if (value !== value) {
if (typeof value !== 'string') {

@@ -124,0 +122,0 @@ return false

{
"name": "jest-serializer-path",
"version": "0.1.12",
"version": "0.1.13",
"description": "Remove absolute paths from your Jest snapshots",

@@ -32,5 +32,5 @@ "author": "tribou",

"cross-env": "^5.1.1",
"eslint": "^3.16.0",
"eslint": "^4.19.1",
"eslint-plugin-tribou": "^1.0.5",
"jest": "^21.2.1",
"jest": "^22.4.3",
"jest-junit": "^3.3.0"

@@ -58,4 +58,4 @@ },

"yarn": "npm run --silent yarn-bin -- install --prefer-offline",
"yarn-bin": "node bin/yarn-1.3.2.js"
"yarn-bin": "node bin/yarn-1.5.1.js"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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