diff --git a/test/red/runtime/nodes/context/index_spec.js b/test/red/runtime/nodes/context/index_spec.js index fa048aa31..c4bfa12ed 100644 --- a/test/red/runtime/nodes/context/index_spec.js +++ b/test/red/runtime/nodes/context/index_spec.js @@ -142,6 +142,16 @@ describe('context', function() { keys[1].should.eql("abc"); }); + it('should enumerate only context keys when GlobalContext was given', function() { + Context.init({functionGlobalContext: {foo:"bar"}}); + return Context.load().then(function(){ + var context = Context.get("1","flowA"); + var keys = context.global.keys("global"); + keys.should.have.length(1); + keys[0].should.eql("foo"); + }); + }); + it('should store data on memory when contextStorage is not defined', function() { var context = Context.get("1","flow"); context.set("#nonexist.key1", "val1");