From a23dd0e5cb8ba299eec0d4effdb153251186be0c Mon Sep 17 00:00:00 2001 From: Mark Nadal Date: Thu, 22 Jan 2015 04:22:48 -0700 Subject: [PATCH] kick-blanking, context variables, and bidirectional key/set set/key load/set working! --- gun.js | 2 -- test/common.js | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/gun.js b/gun.js index 15ce9332..b7268e83 100644 --- a/gun.js +++ b/gun.js @@ -411,7 +411,6 @@ if(!gun._.field){ Gun.obj.map(gun._.keys, function(yes, key){ if(yes){ return } - console.log("setting fields", key, yes); gun.key(key); }); } @@ -640,7 +639,6 @@ (chain._ = chain._ || {})[where] = chain._[where] || []; chain.$[where] = chain.$[where] || function(fn){ if(chain.args){ - //console.log("shoot!", chain.args); fn.apply(chain, chain.args); } else { (chain._[where]||[]).push(fn); diff --git a/test/common.js b/test/common.js index 3ee0d0a5..9f60dde2 100644 --- a/test/common.js +++ b/test/common.js @@ -354,6 +354,20 @@ describe('Gun', function(){ }); }); + it('load path empty set', function(done){ + gun.load('hello/world').path('earth').set('mars').get(function(val){ + expect(val).to.be('mars'); + done(); + }); + }); + + it('load path get', function(done){ + gun.load('hello/world').path('earth').get(function(val){ + expect(val).to.be('mars'); + done(); + }); + }); + it('key set get', function(done){ gun.key('world/hello').set({world: "hello"}).get(function(val){ expect(val.world).to.be('hello');