We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c31790a commit b8f043aCopy full SHA for b8f043a
lib/utils.js
@@ -1,9 +1,9 @@
1
var Log = require('./logger'),
2
logger = new Log(global.logLevel),
3
- config = require('./config'),
4
http = require('http'),
5
url = require('url'),
6
- querystring = require('querystring');
+ querystring = require('querystring'),
+ config;
7
8
String.prototype.escapeSpecialChars = function() {
9
return this.replace(/\n/g, '\\n')
@@ -51,6 +51,10 @@ var objectSize = function objectSize(obj) {
51
};
52
53
var alertBrowserStack = function alertBrowserStack(subject, content, params, fn) {
54
+ if (!config) {
55
+ config = require('./config');
56
+ }
57
+
58
var endpoint = config.alert_endpoint || 'http://www.browserstack.com/automate/alert';
59
var urlObject = url.parse(endpoint);
60
0 commit comments