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

Make nock an optional dependency.

This commit is contained in:
Mark Hindess 2014-10-01 17:46:00 +01:00
parent c631b393e9
commit ea6313c9a1

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
try {
nock = require('nock');
} catch (err) {
// nevermind, will skip nock tests
nock = null;
}
}
var RED = require("../../red/red.js");
var redNodes = require("../../red/nodes");