Haha-Yes/node_modules/buffer/bin/test.js
2018-09-09 21:20:36 +02:00

18 lines
502 B
JavaScript

#!/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)
}
})