Skip to content
This repository was archived by the owner on Dec 18, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix json stringify
  • Loading branch information
kevinlambert committed Nov 12, 2015
commit 91dc7025ddbef1f4f9a5961e7740f465f90f4784
5 changes: 2 additions & 3 deletions lib/workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*/

var async = require('async');
var JSONfn = require('json-fn');

module.exports = function(pagename, args) {

Expand Down Expand Up @@ -36,9 +37,7 @@ module.exports = function(pagename, args) {
throw new Error('You need to specify a name for your visual regression component');
}

var queuedShots = JSON.parse(JSON.stringify(args, function(key, val) {
return (typeof val === 'function') ? '' + val : val;
})),
var queuedShots = JSONfn.parse(JSONfn.stringify(args)),
currentArgs = queuedShots[0];

var context = {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@
"dependencies": {
"async": "^0.9.0",
"deepmerge": "^0.2.7",
"fs-extra": "^0.18.2",
"glob": "^5.0.5",
"gm": "^1.17.0",
"json-fn": "^0.60.0",
"node-resemble-js": "0.0.4",
"request": "^2.55.0",
"rimraf": "^2.3.2",
"tar": "^2.1.0",
"fs-extra": "^0.18.2",
"tar.gz": "^1.0.1"
},
"devDependencies": {
Expand Down