snap-shot-core
Advanced tools
Comparing version 1.7.2 to 1.7.3
{ | ||
"name": "snap-shot-core", | ||
"description": "Save / load named snapshots, useful for tests", | ||
"version": "1.7.2", | ||
"version": "1.7.3", | ||
"author": "Gleb Bahmutov <gleb.bahmutov@gmail.com>", | ||
@@ -89,4 +89,4 @@ "bugs": "https://github.com/bahmutov/snap-shot-core/issues", | ||
"git-issues": "1.3.1", | ||
"github-post-release": "1.6.1", | ||
"license-checker": "12.0.0", | ||
"github-post-release": "1.7.1", | ||
"license-checker": "12.1.0", | ||
"mocha": "3.4.2", | ||
@@ -105,2 +105,3 @@ "next-update-travis": "1.4.0", | ||
"is-ci": "1.0.10", | ||
"jsesc": "2.5.1", | ||
"lazy-ass": "1.6.0", | ||
@@ -107,0 +108,0 @@ "mkdirp": "0.5.1" |
@@ -11,2 +11,3 @@ 'use strict' | ||
const escapeQuotes = require('escape-quotes') | ||
const jsesc = require('jsesc') | ||
@@ -75,3 +76,7 @@ const cwd = process.cwd() | ||
const value = snapshots[testName] | ||
const serialized = JSON.stringify(value, null, 2) | ||
const serialized = jsesc(value, { | ||
json: true, | ||
compact: false, | ||
indent: ' ' | ||
}) | ||
s += `exports['${escapeQuotes(testName)}'] = ${serialized}\n\n` | ||
@@ -78,0 +83,0 @@ }) |
22980
446
7
+ Addedjsesc@2.5.1
+ Addedjsesc@2.5.1(transitive)