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

test.js « bin - github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2675c80bdc48e94de962cfda1fd564cd827d9d96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env node

var spawn = require('cross-spawn-async')

var runBrowserTests = !process.env.TRAVIS_PULL_REQUEST ||
  process.env.TRAVIS_PULL_REQUEST === 'false'

var node = spawn('npm', ['run', 'test-node'], { stdio: 'inherit' })
node.on('close', function (code) {
  if (code === 0 && runBrowserTests) {
    var browser = spawn('npm', ['run', 'test-browser'], { stdio: 'inherit' })
    browser.on('close', function (code) {
      process.exit(code)
    })
  } else {
    process.exit(code)
  }
})