From eb3ea14960302eeb950c45369c9bf9463724cad0 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Fri, 2 Mar 2018 12:40:07 -0800 Subject: [PATCH] Remove bin/test.js Rely on airtap to skip the browser tests in Travis PRs. No need for our custom script! --- bin/test.js | 22 ---------------------- package.json | 2 +- 2 files changed, 1 insertion(+), 23 deletions(-) delete mode 100644 bin/test.js diff --git a/bin/test.js b/bin/test.js deleted file mode 100644 index f1be65fd..00000000 --- a/bin/test.js +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env node - -var spawn = require('cross-spawn') - -var runSauceLabs = !process.env.CI || - (process.env.SAUCE_USERNAME && process.env.SAUCE_ACCESS_KEY) - -npmRun('test-node', function () { - if (runSauceLabs) { - npmRun('test-browser') - } -}) - -function npmRun (scriptName, onSuccess) { - spawn('npm', ['run', scriptName], { stdio: 'inherit' }).on('close', function (code) { - if (code === 0 && onSuccess) { - onSuccess(code) - } else { - process.exit(code) - } - }) -} diff --git a/package.json b/package.json index afe1a263..ae023247 100644 --- a/package.json +++ b/package.json @@ -115,7 +115,7 @@ "build": "browserify -s WebTorrent -e ./ | babili > webtorrent.min.js", "build-debug": "browserify -s WebTorrent -e ./ > webtorrent.debug.js", "size": "npm run build && cat webtorrent.min.js | gzip | wc -c", - "test": "standard && node ./bin/test.js", + "test": "standard && npm run test-node && npm run test-browser", "test-browser": "airtap -- test/*.js test/browser/*.js", "test-browser-local": "airtap --local -- test/*.js test/browser/*.js", "test-node": "tape test/*.js test/node/*.js",