test-machinepack
Advanced tools
Comparing version 0.2.4 to 0.2.5
{ | ||
"name": "test-machinepack", | ||
"author": "Mike McNeil <@mikermcneil>", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"description": "Raw test runner for machinepacks (also includes a simple stub test driver)", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -46,3 +46,17 @@ /** | ||
// POTENTIALLY: also try to parse JSON for ALL input values for now (b/c of testscribe) | ||
if (inputDef.typeclass === 'dictionary' || inputDef.typeclass === 'array' || _.isArray(inputDef.example) || _.isPlainObject(inputDef.example)) { | ||
if ( | ||
inputDef.typeclass === 'dictionary' || inputDef.typeclass === 'array' || | ||
_.isArray(inputDef.example) || _.isPlainObject(inputDef.example) || | ||
(inputDef.typeclass === '*' && (function determineIfConfdValIsJsonEncodedDictOrArray(){ | ||
var attemptedParse; | ||
try { | ||
attemptedParse = JSON.parse(configuredValue); | ||
if (_.isArray(attemptedParse) || _.isPlainObject(attemptedParse)) { | ||
return true; | ||
} | ||
} | ||
catch (e) {} | ||
return false; | ||
})() ) | ||
) { | ||
try { | ||
@@ -49,0 +63,0 @@ configuredValue = JSON.parse(configuredValue); |
17520
319