We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ef1c7e2 commit d29b5bdCopy full SHA for d29b5bd
node.js/tests/test.js
@@ -1,7 +1,9 @@
1
-var PUBNUB = require('../pubnub.js'),
2
- assert = require('assert'),
3
- _ = require("underscore"),
4
- nock = require('nock');
+if (typeof window == 'undefined') {
+ var PUBNUB = require('../pubnub.js'),
+ assert = require('assert'),
+ _ = require("underscore"),
5
+ nock = require('nock');
6
+}
7
8
var pubnub = PUBNUB.init({
9
publish_key: 'ds',
@@ -63,7 +65,9 @@ describe('Pubnub', function () {
63
65
this.timeout(180000);
64
66
67
before(function () {
- nock.enableNetConnect();
68
+ if (nock) {
69
+ nock.enableNetConnect();
70
+ }
71
72
pubnub.channel_group_list_groups({
73
callback: function (r) {
0 commit comments