jest-serializer-path
Advanced tools
Comparing version
@@ -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 @@ |
@@ -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
168707
13.92%380
10.14%