diff options
author | kumavis <aaron@kumavis.me> | 2017-08-04 13:24:22 +0800 |
---|---|---|
committer | kumavis <aaron@kumavis.me> | 2017-08-04 13:24:22 +0800 |
commit | 0a5a46b8f40d6f52a96f0fee96f271dd66a506ab (patch) | |
tree | 1ee9b65a6ec386c9886b373c23befb8edc2ba124 /test | |
parent | f804567d24cd3e0bd6d8dd77f637da79207c5e08 (diff) | |
download | tangerine-wallet-browser-0a5a46b8f40d6f52a96f0fee96f271dd66a506ab.tar.gz tangerine-wallet-browser-0a5a46b8f40d6f52a96f0fee96f271dd66a506ab.tar.zst tangerine-wallet-browser-0a5a46b8f40d6f52a96f0fee96f271dd66a506ab.zip |
test - integration - better error handling
Diffstat (limited to 'test')
-rw-r--r-- | test/integration/index.js | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/test/integration/index.js b/test/integration/index.js index ab418a146..e089fc39b 100644 --- a/test/integration/index.js +++ b/test/integration/index.js @@ -6,15 +6,14 @@ const bundlePath = path.join(__dirname, 'bundle.js') const b = browserify() -try { - const writeStream = fs.createWriteStream(bundlePath) +const writeStream = fs.createWriteStream(bundlePath) - tests.forEach(function (fileName) { - b.add(path.join(__dirname, 'lib', fileName)) - }) - - b.bundle().pipe(writeStream) -} catch (err) { - throw new Error('Integration tests build failure - ' + err.stack) -} +tests.forEach(function (fileName) { + b.add(path.join(__dirname, 'lib', fileName)) +}) +b.bundle() +.pipe(writeStream) +.on('error', (err) => { + throw err +}) |