Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
pm2 / usr / local / lib / pm2 / node_modules / continuation-local-storage / test / async-context.tap.js
Size: Mime:
'use strict';

var tap             = require('tap')
  , test            = tap.test
  , createNamespace = require('../context.js').createNamespace
  ;

test("asynchronously propagating state with local-context-domains", function (t) {
  t.plan(2);

  var namespace = createNamespace('namespace');
  t.ok(process.namespaces.namespace, "namespace has been created");

  namespace.run(function () {
    namespace.set('test', 1337);
    t.equal(namespace.get('test'), 1337, "namespace is working");
  });
});