Skip to content

Commit 1bcbe6c

Browse files
committed
ci(saucelabs): gracefully exit if no credentials for correct cleaning
1 parent 2035ad0 commit 1bcbe6c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

bin/run-test.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ function runTests(client) {
1717
return utils.npmRun('mocha', ['--ui', 'bdd', 'test/*']);
1818
} else {
1919
var options = buildKarmaConf(client);
20+
21+
// buildKarmaConf returns null if we can't run the tests
22+
// e.g. SauceLabs with no credentials on Travis
23+
if (!options) {
24+
return Promise.resolve();
25+
}
26+
2027
return utils.karmaRun(options);
2128
}
2229
}
@@ -63,7 +70,7 @@ function buildKarmaConf(client) {
6370
client.runner === 'saucelabs' &&
6471
process.env.TRAVIS_SECURE_ENV_VARS === 'false') {
6572
console.error('Not running test, cannot connect to saucelabs');
66-
process.exit(0);
73+
return null;
6774
}
6875

6976
if (client.runner === 'saucelabs') {

0 commit comments

Comments
 (0)