mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge pull request #427 from hindessm/add-nock-to-node-test-helper
Add nock to node test helper.
This commit is contained in:
commit
c631b393e9
@ -17,6 +17,11 @@
|
|||||||
var should = require("should");
|
var should = require("should");
|
||||||
var when = require("when");
|
var when = require("when");
|
||||||
var request = require('supertest');
|
var request = require('supertest');
|
||||||
|
var nock;
|
||||||
|
if (!process.version.match(/^v0\.[0-9]\./)) {
|
||||||
|
// only set nock for node >= 0.10
|
||||||
|
nock = require('nock');
|
||||||
|
}
|
||||||
var RED = require("../../red/red.js");
|
var RED = require("../../red/red.js");
|
||||||
var redNodes = require("../../red/nodes");
|
var redNodes = require("../../red/nodes");
|
||||||
var flows = require("../../red/nodes/flows");
|
var flows = require("../../red/nodes/flows");
|
||||||
@ -62,7 +67,7 @@ module.exports = {
|
|||||||
};
|
};
|
||||||
var settings = {
|
var settings = {
|
||||||
available: function() { return false; }
|
available: function() { return false; }
|
||||||
}
|
};
|
||||||
|
|
||||||
redNodes.init(settings, storage);
|
redNodes.init(settings, storage);
|
||||||
credentials.init(storage);
|
credentials.init(storage);
|
||||||
@ -113,4 +118,6 @@ module.exports = {
|
|||||||
|
|
||||||
url: function() { return url; },
|
url: function() { return url; },
|
||||||
|
|
||||||
|
nock: nock,
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user