aboutsummaryrefslogblamecommitdiffstats
path: root/test/integration/index.js
blob: e9263c6c87edc42e527f21474ac69bdcbbd1d053 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11

                          
                                      


                                                       
                    



                           
 
                                                    
 


                                                
 
                              

                                                                   
 
 
var fs = require('fs')
var path = require('path')
var browserify = require('browserify')
var tests = fs.readdirSync(path.join(__dirname, 'lib'))
var bundlePath = path.join(__dirname, 'bundle.js')

var b = browserify()

// Remove old bundle
try {
  fs.unlinkSync(bundlePath)

  var 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)
}