// var nf = require('./src/node-fetchable');
// var bbi = require('./src/bbi');
// nf.NodeFetchable('test-leap.bb')

// var bb
// var file =
//
// file.fetch().then(function (data) {
//   // console.log(data)
// })


// var bwa = require('../')
// var fs = require('fs')
// var crypto = require('crypto')
// var request = require('request')
var bin = require('../src/binutils')
var bbi = require('../src/bbi')
var nf = require('../src/node-fetchable')
var data = require('./data')


var should = require('should')
// var tool = require('tool-stream')
// var through = require('through2')
// var async = require('async')

require('mocha')

describe("Parse from URL", function() {
  this.timeout(1300000);
  var bb
  it("Can get bbi", function(done) {
    var url = 'http://www.biodalliance.org/datasets/tests/test-leap.bb'
    var file = new bin.URLFetchable(url)
    bbi.connectBBI(file).then(success).catch(failure)
    function success(result) {
      result.should.eql(data.test1)
      bb = result
      done()
    }
  })
  it("Can get bbi features", function(done) {
    bb.getUnzoomedView().fetch('chr1', 1, 100000000).then(success).catch(failure)
    function success(result) {
      result.should.eql(data.test2)
      done()
    }
  })
})

describe("Parse from local file", function() {
  this.timeout(1300000);
  var bb
  it("Can get bbi", function(done) {
    var file = new nf.NodeFetchable('./test/test-leap.bb')
    data.test1.data ={ blob: './test/test-leap.bb', opts: undefined }
    bbi.connectBBI(file).then(success).catch(failure)
    function success(result) {
      result.should.eql(data.test1)
      bb = result
      done()
    }
  })
  it("Can get bbi features", function(done) {
    bb.getUnzoomedView().fetch('chr1', 1, 100000000).then(success).catch(failure)
    function success(result) {
      result.should.eql(data.test2)
      done()
    }
  })
})

function failure(error) { console.error(error) }

@@ -1,345 +1,4 @@
-// var nf = require('./src/node-fetchable');%0A// var bbi = require('./src/bbi');%0A// nf.NodeFetchable('test-leap.bb')%0A%0A// var bb%0A// var file =%0A//%0A// file.fetch().then(function (data) %7B%0A//   // console.log(data)%0A// %7D)%0A%0A%0A// var bwa = require('../')%0A// var fs = require('fs')%0A// var crypto = require('crypto')%0A// var request = require('request')%0A
 var 
@@ -169,114 +169,8 @@
 ld')
-%0A// var tool = require('tool-stream')%0A// var through = require('through2')%0A// var async = require('async')
 %0A%0Are

Remove development commented code from tests