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:
parent
c631b393e9
commit
ea6313c9a1
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user