Skip to content

Commit 92fb720

Browse files
committed
Merge pull request #77 from browserstack/testing
Testing
2 parents 08e7297 + 102551a commit 92fb720

File tree

15 files changed

+178
-1
lines changed

15 files changed

+178
-1
lines changed

.gitmodules

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[submodule "tests/external-repos/underscorejs"]
2+
path = tests/external-repos/underscorejs
3+
url = https://github.com/browserstack/underscore
4+
[submodule "tests/external-repos/Modernizr"]
5+
path = tests/external-repos/Modernizr
6+
url = https://github.com/browserstack/Modernizr
7+
[submodule "tests/external-repos/url.js"]
8+
path = tests/external-repos/url.js
9+
url = https://github.com/browserstack/url.js.git
10+
[submodule "tests/external-repos/mout"]
11+
path = tests/external-repos/mout
12+
url = https://github.com/browserstack/mout

bin/cli.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,8 @@ function runTests() {
290290
});
291291
});
292292
});
293+
} else {
294+
launchServer();
293295
}
294296
}
295297

lib/_patch/browserstack.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
console.log = function (arguments) {
4343
post('/_log/', arguments, function () {});
4444
};
45+
console.warn = function (arguments) {
46+
post('/_log/', arguments, function () {});
47+
};
4548

4649
BrowserStack.post = post;
4750
BrowserStack.getParameterByName = getParameterByName;

lib/utils.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ var uuid = function uuidGenerator() {
2626
};
2727

2828
var browserString = function browserString(config) {
29-
return config.os + ' ' + config.os_version + ', ' + (config.browser == 'ie' ? 'IE' : titleCase(config.browser || config.device)) + ' ' + (config.browser_version || config.device);
29+
var os_details = config.os + ' ' + config.os_version;
30+
if (config.browser) {
31+
return os_details + ', ' + (config.browser == 'ie' ? 'Internet Explorer' : titleCase(config.browser)) + ' ' + config.browser_version;
32+
} else {
33+
return os_details + (config.device ? (', ' + config.device) : "");
34+
}
3035
};
3136

3237
var objectSize = function objectSize(obj) {

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
"chalk": "0.4.0",
1313
"tunnel": "0.0.3"
1414
},
15+
"devDependencies": {
16+
"mocha": "~1.15.1"
17+
},
1518
"licenses": [
1619
{
1720
"type": "MIT",

tests/conf/Modernizr.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"username": "BROWSERSTACK_USERNAME",
3+
"key": "BROWSERSTACK_KEY",
4+
"test_path": "test/index.html",
5+
"debug": true,
6+
"browsers": [
7+
]
8+
}

tests/conf/mout.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"username": "BROWSERSTACK_USERNAME",
3+
"key": "BROWSERSTACK_KEY",
4+
"test_path": "tests/runner.html",
5+
"test_framework": "jasmine",
6+
"debug": true,
7+
"browsers": [
8+
]
9+
}

tests/conf/underscorejs.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"username": "BROWSERSTACK_USERNAME",
3+
"key": "BROWSERSTACK_KEY",
4+
"test_path": "test/index.html",
5+
"debug": true,
6+
"browsers": [
7+
]
8+
}

tests/conf/url.js.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"username": "BROWSERSTACK_USERNAME",
3+
"key": "BROWSERSTACK_KEY",
4+
"test_path": "test.html",
5+
"test_framework": "mocha",
6+
"debug": true,
7+
"browsers": [
8+
]
9+
}

tests/external-repos/Modernizr

Submodule Modernizr added at f514972

0 commit comments

Comments
 (0)