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: 2fc368b98fbdf7d875d4bf1647be4dd963db1a9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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 (code === 0 && runBrowserTests) {
    var browser = cp.spawn('npm', ['run', 'test-browser'], { stdio: 'inherit' })
    browser.on('close', function (code) {
      process.exit(code)
    })
  } else {
    process.exit(code)
  }
})