Skip to content

Commit

Permalink
The key value storage is now one and is global. This is needed so tha…
Browse files Browse the repository at this point in the history
…t the same object can be shared when stubbing different external services (hosts). For example, this was needed to share object state when stubbing both graph.facebook.com and graph-video.facebook.com in the same test.
  • Loading branch information
Emanuil Slavov committed Nov 23, 2016
1 parent 2f00e92 commit 14b0208
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions source/loadStubRules.js
Expand Up @@ -22,16 +22,15 @@ function loadStubRules() {

var stubRules = {};

var storage;
storage = new nodeCache();

Object.keys(global.serversToStub).forEach(function(protocol) {
global.serversToStub[protocol].forEach(function (server) {

var storage;

var stubFiles = module.exports.getStubFiles(protocol, server);


stubRules[server] = [];
storage = new nodeCache();

stubFiles.forEach(function (stubFile) {

Expand Down

0 comments on commit 14b0208

Please sign in to comment.