@@ -125,7 +125,7 @@ test('a most basic test', function(t) {
125125'xxxxxxxxxxxxxxxxxxxxx' ] ;
126126
127127r . on ( 'end' , function ( ) {
128- t . same ( reads , expect ) ;
128+ assert . deepStrictEqual ( reads , expect ) ;
129129t . end ( ) ;
130130} ) ;
131131
@@ -158,7 +158,7 @@ test('pipe', function(t) {
158158const w = new TestWriter ( ) ;
159159
160160w . on ( 'end' , function ( received ) {
161- t . same ( received , expect ) ;
161+ assert . deepStrictEqual ( received , expect ) ;
162162t . end ( ) ;
163163} ) ;
164164
@@ -204,15 +204,15 @@ test('pipe', function(t) {
204204t . equal ( ended0 , false ) ;
205205ended0 = true ;
206206ended ++ ;
207- t . same ( results , expect [ 0 ] ) ;
207+ assert . deepStrictEqual ( results , expect [ 0 ] ) ;
208208} ) ;
209209
210210w [ 1 ] . on ( 'end' , function ( results ) {
211211t . equal ( ended1 , false ) ;
212212ended1 = true ;
213213ended ++ ;
214214t . equal ( ended , 2 ) ;
215- t . same ( results , expect [ 1 ] ) ;
215+ assert . deepStrictEqual ( results , expect [ 1 ] ) ;
216216t . end ( ) ;
217217} ) ;
218218
@@ -239,11 +239,11 @@ test('multipipe', function(t) {
239239
240240let c = 2 ;
241241w [ 0 ] . on ( 'end' , function ( received ) {
242- t . same ( received , expect , 'first' ) ;
242+ assert . deepStrictEqual ( received , expect , 'first' ) ;
243243if ( -- c === 0 ) t . end ( ) ;
244244} ) ;
245245w [ 1 ] . on ( 'end' , function ( received ) {
246- t . same ( received , expect , 'second' ) ;
246+ assert . deepStrictEqual ( received , expect , 'second' ) ;
247247if ( -- c === 0 ) t . end ( ) ;
248248} ) ;
249249
@@ -284,13 +284,13 @@ test('multipipe', function(t) {
284284
285285w [ 0 ] . on ( 'end' , function ( results ) {
286286ended ++ ;
287- t . same ( results , expect [ 0 ] ) ;
287+ assert . deepStrictEqual ( results , expect [ 0 ] ) ;
288288} ) ;
289289
290290w [ 1 ] . on ( 'end' , function ( results ) {
291291ended ++ ;
292292t . equal ( ended , 2 ) ;
293- t . same ( results , expect [ 1 ] ) ;
293+ assert . deepStrictEqual ( results , expect [ 1 ] ) ;
294294t . end ( ) ;
295295} ) ;
296296
@@ -300,10 +300,8 @@ test('multipipe', function(t) {
300300} ) ;
301301
302302test ( 'back pressure respected' , function ( t ) {
303- function noop ( ) { }
304-
305303const r = new R ( { objectMode : true } ) ;
306- r . _read = noop ;
304+ r . _read = common . mustNotCall ( ) ;
307305let counter = 0 ;
308306r . push ( [ 'one' ] ) ;
309307r . push ( [ 'two' ] ) ;
@@ -321,7 +319,7 @@ test('back pressure respected', function(t) {
321319r . pipe ( w3 ) ;
322320} ) ;
323321} ;
324- w1 . end = noop ;
322+ w1 . end = common . mustNotCall ( ) ;
325323
326324r . pipe ( w1 ) ;
327325
@@ -347,7 +345,7 @@ test('back pressure respected', function(t) {
347345
348346return false ;
349347} ;
350- w2 . end = noop ;
348+ w2 . end = common . mustCall ( ) ;
351349
352350let w3 = new R ( ) ;
353351w3 . write = function ( chunk ) {
@@ -380,7 +378,7 @@ test('read(0) for ended streams', function(t) {
380378const r = new R ( ) ;
381379let written = false ;
382380let ended = false ;
383- r . _read = function ( n ) { } ;
381+ r . _read = common . mustNotCall ( ) ;
384382
385383r . push ( Buffer . from ( 'foo' ) ) ;
386384r . push ( null ) ;
@@ -451,7 +449,7 @@ test('adding readable triggers data flow', function(t) {
451449
452450test ( 'chainable' , function ( t ) {
453451const r = new R ( ) ;
454- r . _read = common . noop ;
452+ r . _read = common . mustCall ( ) ;
455453const r2 = r . setEncoding ( 'utf8' ) . pause ( ) . resume ( ) . pause ( ) ;
456454t . equal ( r , r2 ) ;
457455t . end ( ) ;
0 commit comments