diff options
test - integration - better error handling
-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 +}) |