Skip to content

Commit bdd9558

Browse files
committed
Reenable download test
1 parent 97c5354 commit bdd9558

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

test/bionode-ncbi.js

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -28,33 +28,33 @@ test('Download list', function(t) {
2828
})
2929

3030

31-
// test('Download', function(t) {
32-
// t.plan(2)
33-
//
34-
// async.eachSeries(
35-
// [
36-
// 'should take a database name and search term, and download datasets',
37-
// 'repeat same download to cover already downloaded branch'
38-
// ],
39-
// testDownload
40-
// )
41-
//
42-
// function testDownload(msg, cb) {
43-
// var path
44-
// ncbi.download('assembly', 'Guillardia theta')
45-
// .on('data', function(data) { path = data.path })
46-
// .on('end', function() {
47-
// var file = fs.ReadStream(path)
48-
// var shasum = crypto.createHash('sha1')
49-
// file.on('data', function(d) { shasum.update(d) })
50-
// file.on('end', function() {
51-
// var sha1 = shasum.digest('hex');
52-
// t.equal(sha1, 'a2dc7b3b0ae6f40d5205c4394c2fe8bc65d52bc2', msg)
53-
// cb()
54-
// })
55-
// })
56-
// }
57-
// })
31+
test('Download', function(t) {
32+
t.plan(2)
33+
34+
async.eachSeries(
35+
[
36+
'should take a database name and search term, and download datasets',
37+
'repeat same download to cover already downloaded branch'
38+
],
39+
testDownload
40+
)
41+
42+
function testDownload(msg, cb) {
43+
var path
44+
ncbi.download('assembly', 'Guillardia theta')
45+
.on('data', function(data) { path = data.path })
46+
.on('end', function() {
47+
var file = fs.ReadStream(path)
48+
var shasum = crypto.createHash('sha1')
49+
file.on('data', function(d) { shasum.update(d) })
50+
file.on('end', function() {
51+
var sha1 = shasum.digest('hex');
52+
t.equal(sha1, 'a2dc7b3b0ae6f40d5205c4394c2fe8bc65d52bc2', msg)
53+
cb()
54+
})
55+
})
56+
}
57+
})
5858

5959

6060
test('Search', function(t) {

0 commit comments

Comments
 (0)