@@ -16,63 +16,6 @@ const bigLink = require('buffer!./test-data/1.2MiB.txt.link-block0')
16
16
const marbuf = require ( 'buffer!./test-data/200Bytes.txt.block' )
17
17
18
18
module . exports = function ( repo ) {
19
- describe ( 'chunker: fixed size' , function ( ) {
20
- this . timeout ( 10000 )
21
-
22
- it ( '256 Bytes chunks' , function ( done ) {
23
- let counter = 0
24
- fileStream ( )
25
- . pipe ( FixedSizeChunker ( 256 ) )
26
- . pipe ( through ( function ( chunk , enc , cb ) {
27
- if ( chunk . length < 256 ) {
28
- expect ( counter ) . to . be . below ( 1 )
29
- counter += 1
30
- return cb ( )
31
- }
32
- expect ( chunk . length ) . to . equal ( 256 )
33
- cb ( )
34
- } , ( ) => {
35
- done ( )
36
- } ) )
37
- } )
38
-
39
- it ( '256 KiB chunks' , function ( done ) {
40
- let counter = 0
41
- const KiB256 = 262144
42
- fileStream ( )
43
- . pipe ( FixedSizeChunker ( KiB256 ) )
44
- . pipe ( through ( ( chunk , enc , cb ) => {
45
- if ( chunk . length < 262144 ) {
46
- expect ( counter ) . to . be . below ( 1 )
47
- counter += 1
48
- return cb ( )
49
- }
50
- expect ( chunk . length ) . to . equal ( 262144 )
51
- cb ( )
52
- } , ( ) => {
53
- done ( )
54
- } ) )
55
- } )
56
-
57
- it ( '256 KiB chunks of non scalar filesize' , function ( done ) {
58
- let counter = 0
59
- const KiB256 = 262144
60
- fileStream ( )
61
- . pipe ( FixedSizeChunker ( KiB256 ) )
62
- . pipe ( through ( ( chunk , enc , cb ) => {
63
- if ( chunk . length < KiB256 ) {
64
- expect ( counter ) . to . be . below ( 2 )
65
- counter += 1
66
- return cb ( )
67
- }
68
- expect ( chunk . length ) . to . equal ( KiB256 )
69
- cb ( )
70
- } , ( ) => {
71
- done ( )
72
- } ) )
73
- } )
74
- } )
75
-
76
19
describe ( 'layout: importer' , function ( ) {
77
20
it ( 'import a small buffer' , function ( done ) {
78
21
// this is just like "import a small file"
0 commit comments