Skip to content

Commit 8881273

Browse files
committed
log test failure values
1 parent fce3c84 commit 8881273

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@ var obj = {
2121
//optional third argument is for default when object is not found
2222
function check(path, value, def) {
2323

24-
assert.strictEqual(delve(obj, path, def), value);
24+
var out = delve(obj, path, def);
25+
assert.strictEqual(out, value, 'delve(obj, "'+path+'") should be '+value+', got '+out);
2526
console.log(' ✓ delve(obj, "'+path+'"'+ (def ? ', "'+def+'"' : '') + ')');
2627

27-
if(path) {
28+
if (path) {
2829
var arr = path.split('.');
2930
assert.strictEqual(delve(obj, arr, def), value);
3031
console.log(' ✓ delve(obj, ' + JSON.stringify(arr) + (def ? ', "'+def+'"' : '') + ')');

0 commit comments

Comments
 (0)