Skip to content

Commit b2ff9ff

Browse files
author
Rohan Jain
committed
Add contenxt to debug alerts
1 parent a50ccc0 commit b2ff9ff

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/utils.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ var alertBrowserStack = function alertBrowserStack (subject, content, params, fn
3434
var endpoint = config.alert_endpoint || "http://www.browserstack.com/automate/alert";
3535
var urlObject = url.parse(endpoint);
3636

37-
console.log("[Alert] %s", subject);
37+
var context = config.alert_context || "Runner alert";
38+
console.log("[%s] %s", context, subject);
3839

3940
if (typeof fn !== 'function') {
4041
if (typeof params === 'function') {
@@ -51,6 +52,7 @@ var alertBrowserStack = function alertBrowserStack (subject, content, params, fn
5152

5253
params.subject = subject;
5354
params.content = content;
55+
params.context = context;
5456

5557
var body = querystring.stringify(params);
5658
var options = {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "browserstack-runner",
33
"description": "A command line interface to run browser tests over BrowserStack",
4-
"version": "0.0.2",
4+
"version": "0.0.3",
55
"homepage": "https://github.com/browserstack/browserstack-runner",
66
"repository": {
77
"type": "git",

0 commit comments

Comments
 (0)