Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2014-11-03 03:08:06 +0300
committerFeross Aboukhadijeh <feross@feross.org>2014-11-03 03:08:06 +0300
commitc3e4553f559df9193019228bda248e92e279ecb8 (patch)
tree8493a6b93a252d80f14edee6138c800f61172564 /bin
parentc670b513a86f3bafcb17c6631f4c74872b991ed2 (diff)
Don't run browser tests in PRs because they fail
Travis has an issue where PRs can’t access Sauce Labs credentials. See: https://support.saucelabs.com/entries/25614798-How-can-we-set-up-an-open -source-account-that-runs-tests-on-people-s-pull-requests-
Diffstat (limited to 'bin')
-rw-r--r--bin/test.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/bin/test.js b/bin/test.js
new file mode 100644
index 0000000..33bb300
--- /dev/null
+++ b/bin/test.js
@@ -0,0 +1,18 @@
+#!/usr/bin/env node
+
+var cp = require('child_process')
+
+var runBrowserTests = !process.env.TRAVIS_PULL_REQUEST ||
+ process.env.TRAVIS_PULL_REQUEST === 'false'
+
+var node = cp.spawn('npm', ['run', 'test-node'], { stdio: 'inherit' })
+node.on('close', function (code) {
+ if (runBrowserTests) {
+ var browser = cp.spawn('npm', ['run', 'test-browser'], { stdio: 'inherit' })
+ browser.on('close', function (code) {
+ process.exit(code)
+ })
+ } else {
+ process.exit(code)
+ }
+})