From: Feross Aboukhadijeh Date: Mon, 22 Dec 2014 10:34:03 +0000 (-0800) Subject: npm test: abort if node tests fail X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=e17680034c2d4134e80f86c3d085cca29be9d63a;p=buffer.git npm test: abort if node tests fail --- diff --git a/bin/test.js b/bin/test.js index 33bb300..2fc368b 100644 --- a/bin/test.js +++ b/bin/test.js @@ -7,7 +7,7 @@ var runBrowserTests = !process.env.TRAVIS_PULL_REQUEST || var node = cp.spawn('npm', ['run', 'test-node'], { stdio: 'inherit' }) node.on('close', function (code) { - if (runBrowserTests) { + if (code === 0 && runBrowserTests) { var browser = cp.spawn('npm', ['run', 'test-browser'], { stdio: 'inherit' }) browser.on('close', function (code) { process.exit(code)