@@ -46,7 +46,7 @@ function run() {
46
46
console . log ( '# %s' , name ) ;
47
47
fn ( {
48
48
same : assert . deepStrictEqual ,
49
- equal : assert . equal ,
49
+ equal : assert . strictEqual ,
50
50
end : function ( ) {
51
51
count -- ;
52
52
run ( ) ;
@@ -56,7 +56,7 @@ function run() {
56
56
57
57
// ensure all tests have run
58
58
process . on ( 'exit' , function ( ) {
59
- assert . equal ( count , 0 ) ;
59
+ assert . strictEqual ( count , 0 ) ;
60
60
} ) ;
61
61
62
62
process . nextTick ( run ) ;
@@ -136,18 +136,18 @@ test('write bufferize', function(t) {
136
136
} ) ;
137
137
138
138
var encodings =
139
- [ 'hex' ,
140
- 'utf8' ,
141
- 'utf-8' ,
142
- 'ascii' ,
143
- 'latin1' ,
144
- 'binary' ,
145
- 'base64' ,
146
- 'ucs2' ,
147
- 'ucs-2' ,
148
- 'utf16le' ,
149
- 'utf-16le' ,
150
- undefined ] ;
139
+ [ 'hex' ,
140
+ 'utf8' ,
141
+ 'utf-8' ,
142
+ 'ascii' ,
143
+ 'latin1' ,
144
+ 'binary' ,
145
+ 'base64' ,
146
+ 'ucs2' ,
147
+ 'ucs-2' ,
148
+ 'utf16le' ,
149
+ 'utf-16le' ,
150
+ undefined ] ;
151
151
152
152
tw . on ( 'finish' , function ( ) {
153
153
t . same ( tw . buffer , chunks , 'got the expected chunks' ) ;
@@ -174,18 +174,18 @@ test('write no bufferize', function(t) {
174
174
} ;
175
175
176
176
var encodings =
177
- [ 'hex' ,
178
- 'utf8' ,
179
- 'utf-8' ,
180
- 'ascii' ,
181
- 'latin1' ,
182
- 'binary' ,
183
- 'base64' ,
184
- 'ucs2' ,
185
- 'ucs-2' ,
186
- 'utf16le' ,
187
- 'utf-16le' ,
188
- undefined ] ;
177
+ [ 'hex' ,
178
+ 'utf8' ,
179
+ 'utf-8' ,
180
+ 'ascii' ,
181
+ 'latin1' ,
182
+ 'binary' ,
183
+ 'base64' ,
184
+ 'ucs2' ,
185
+ 'ucs-2' ,
186
+ 'utf16le' ,
187
+ 'utf-16le' ,
188
+ undefined ] ;
189
189
190
190
tw . on ( 'finish' , function ( ) {
191
191
t . same ( tw . buffer , chunks , 'got the expected chunks' ) ;
@@ -201,7 +201,7 @@ test('write no bufferize', function(t) {
201
201
202
202
test ( 'write callbacks' , function ( t ) {
203
203
var callbacks = chunks . map ( function ( chunk , i ) {
204
- return [ i , function ( er ) {
204
+ return [ i , function ( ) {
205
205
callbacks . _called [ i ] = chunk ;
206
206
} ] ;
207
207
} ) . reduce ( function ( set , x ) {
@@ -272,7 +272,7 @@ test('end callback called after write callback', function(t) {
272
272
test ( 'encoding should be ignored for buffers' , function ( t ) {
273
273
var tw = new W ( ) ;
274
274
var hex = '018b5e9a8f6236ffe30e31baf80d2cf6eb' ;
275
- tw . _write = function ( chunk , encoding , cb ) {
275
+ tw . _write = function ( chunk ) {
276
276
t . equal ( chunk . toString ( 'hex' ) , hex ) ;
277
277
t . end ( ) ;
278
278
} ;
@@ -284,7 +284,7 @@ test('writables are not pipable', function(t) {
284
284
var w = new W ( ) ;
285
285
w . _write = function ( ) { } ;
286
286
var gotError = false ;
287
- w . on ( 'error' , function ( er ) {
287
+ w . on ( 'error' , function ( ) {
288
288
gotError = true ;
289
289
} ) ;
290
290
w . pipe ( process . stdout ) ;
@@ -297,7 +297,7 @@ test('duplexes are pipable', function(t) {
297
297
d . _read = function ( ) { } ;
298
298
d . _write = function ( ) { } ;
299
299
var gotError = false ;
300
- d . on ( 'error' , function ( er ) {
300
+ d . on ( 'error' , function ( ) {
301
301
gotError = true ;
302
302
} ) ;
303
303
d . pipe ( process . stdout ) ;
@@ -331,7 +331,7 @@ test('dont end while writing', function(t) {
331
331
setTimeout ( function ( ) {
332
332
this . writing = false ;
333
333
cb ( ) ;
334
- } ) ;
334
+ } , 1 ) ;
335
335
} ;
336
336
w . on ( 'finish' , function ( ) {
337
337
assert ( wrote ) ;
@@ -368,7 +368,7 @@ test('finish does not come before sync _write cb', function(t) {
368
368
assert ( writeCb ) ;
369
369
t . end ( ) ;
370
370
} ) ;
371
- w . write ( Buffer . alloc ( 0 ) , function ( er ) {
371
+ w . write ( Buffer . alloc ( 0 ) , function ( ) {
372
372
writeCb = true ;
373
373
} ) ;
374
374
w . end ( ) ;
0 commit comments