From 537755e888d3ad41f82ff16d82af8ad6839972a9 Mon Sep 17 00:00:00 2001 From: "Ryan X. Charles" Date: Wed, 25 Jun 2014 10:03:58 -0700 Subject: [PATCH] fix exception in insight mocha browser tests The Insight tests were actually broken and not running due to trying to access the nonexistent process variable. The proper way to check for this is to see if its type is undefined before trying to access it. --- test/test.blockchain.Insight.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test.blockchain.Insight.js b/test/test.blockchain.Insight.js index 1d1a2bebd..2a54751a7 100644 --- a/test/test.blockchain.Insight.js +++ b/test/test.blockchain.Insight.js @@ -60,7 +60,7 @@ describe('Insight model', function() { }); // Tests for Node - if (process.version) { + if (typeof process !== 'undefined' && process.version) { it('should return array of unspent output', function(done) { var i = new Insight();