Clear node context on close

Fixes #870
This commit is contained in:
Nick O'Leary
2016-06-11 22:53:27 +01:00
parent 7302ac5871
commit 4dc9c7714c
3 changed files with 22 additions and 3 deletions

View File

@@ -108,4 +108,15 @@ describe('context', function() {
context2.global.get("foo").should.eql("test");
});
it('deletes context',function() {
var context = Context.get("1","flowA");
should.not.exist(context.get("foo"));
context.set("foo","abc");
context.get("foo").should.eql("abc");
Context.delete("1","flowA");
context = Context.get("1","flowA");
should.not.exist(context.get("foo"));
})
});