1
1
/* eslint-env mocha */
2
+ /* eslint max-nested-callbacks: ["error", 8] */
2
3
/* globals apiClients */
4
+
3
5
'use strict'
4
6
5
7
const expect = require ( 'chai' ) . expect
6
8
const isNode = require ( 'detect-node' )
7
9
const fs = require ( 'fs' )
8
- const bl = require ( 'bl' )
10
+ // const bl = require('bl')
9
11
const concat = require ( 'concat-stream' )
10
12
const through = require ( 'through2' )
13
+ const streamEqual = require ( 'stream-equal' )
11
14
12
15
const path = require ( 'path' )
13
- const streamEqual = require ( 'stream-equal' )
14
16
15
- const extract = require ( 'tar-stream' ) . extract
17
+ // const extract = require('tar-stream').extract
16
18
17
- let testfile
19
+ const testfile = fs . readFileSync ( path . join ( __dirname , '/../testfile.txt' ) )
18
20
let testfileBig
19
21
20
22
if ( isNode ) {
21
- testfile = fs . readFileSync ( path . join ( __dirname , '/../testfile.txt' ) )
22
23
testfileBig = fs . createReadStream ( path . join ( __dirname , '/../15mb.random' ) , { bufferSize : 128 } )
23
- } else {
24
- testfile = require ( 'raw!../testfile.txt' )
25
24
}
26
25
27
- describe ( '.get' , ( ) => {
26
+ describe . skip ( '.get' , ( ) => {
28
27
it ( 'get with no compression args' , ( done ) => {
29
28
apiClients . a
30
29
. get ( 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP' , ( err , res ) => {
30
+ expect ( err ) . to . not . exist
31
31
32
32
// accumulate the files and their content
33
33
var files = [ ]
@@ -50,6 +50,7 @@ describe('.get', () => {
50
50
it ( 'get with archive true' , ( done ) => {
51
51
apiClients . a
52
52
. get ( 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP' , { archive : true } , ( err , res ) => {
53
+ expect ( err ) . to . not . exist
53
54
54
55
// accumulate the files and their content
55
56
var files = [ ]
@@ -86,7 +87,7 @@ describe('.get', () => {
86
87
} )
87
88
} )
88
89
89
- it . skip ( 'get BIG file' , ( done ) => {
90
+ it ( 'get BIG file' , ( done ) => {
90
91
if ( ! isNode ) {
91
92
return done ( )
92
93
}
@@ -103,9 +104,9 @@ describe('.get', () => {
103
104
} )
104
105
} )
105
106
106
- describe ( 'promise' , ( ) => {
107
- it . skip ( 'get' , ( done ) => {
108
- return apiClients . a . get ( 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP' )
107
+ describe . skip ( 'promise' , ( ) => {
108
+ it ( 'get' , ( done ) => {
109
+ apiClients . a . get ( 'Qma4hjFTnCasJ8PVp3mZbZK5g2vGDT4LByLJ7m8ciyRFZP' )
109
110
. then ( ( res ) => {
110
111
let buf = ''
111
112
res
0 commit comments