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: 2755c1084113f8938814395c96741878d21b9b7f (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 && (!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)
  }
})