1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge pull request #429 from hindessm/fix-build-without-nock

Make nock an optional dependency.
This commit is contained in:
Nick O'Leary 2014-10-01 20:40:57 +01:00
commit b0e2b3d525

View File

@ -20,7 +20,12 @@ var request = require('supertest');
var nock;
if (!process.version.match(/^v0\.[0-9]\./)) {
// only set nock for node >= 0.10
nock = require('nock');
try {
nock = require('nock');
} catch (err) {
// nevermind, will skip nock tests
nock = null;
}
}
var RED = require("../../red/red.js");
var redNodes = require("../../red/nodes");