From e17680034c2d4134e80f86c3d085cca29be9d63a Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Mon, 22 Dec 2014 02:34:03 -0800 Subject: [PATCH] npm test: abort if node tests fail --- bin/test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.34.1