@@ -138,7 +138,7 @@ assert.doesNotThrow(() => Buffer.alloc(1).write('', 1, 0));
138138 const sliceA = b . slice ( offset , offset + asciiString . length ) ;
139139 const sliceB = b . slice ( offset , offset + asciiString . length ) ;
140140 for ( let i = 0 ; i < asciiString . length ; i ++ ) {
141- assert . equal ( sliceA [ i ] , sliceB [ i ] ) ;
141+ assert . strictEqual ( sliceA [ i ] , sliceB [ i ] ) ;
142142 }
143143}
144144
@@ -149,7 +149,7 @@ assert.doesNotThrow(() => Buffer.alloc(1).write('', 1, 0));
149149
150150 b . write ( utf8String , 0 , Buffer . byteLength ( utf8String ) , 'utf8' ) ;
151151 let utf8Slice = b . toString ( 'utf8' , 0 , Buffer . byteLength ( utf8String ) ) ;
152- assert . equal ( utf8String , utf8Slice ) ;
152+ assert . strictEqual ( utf8String , utf8Slice ) ;
153153
154154 assert . strictEqual ( Buffer . byteLength ( utf8String ) ,
155155 b . write ( utf8String , offset , 'utf8' ) ) ;
@@ -1057,7 +1057,8 @@ assert.strictEqual(Buffer.allocUnsafe(1).parent, undefined);
10571057Buffer . poolSize = ps ;
10581058
10591059// Test Buffer.copy() segfault
1060- assert . throws ( ( ) => Buffer . allocUnsafe ( 10 ) . copy ( ) ) ;
1060+ assert . throws ( ( ) => Buffer . allocUnsafe ( 10 ) . copy ( ) ,
1061+ / T y p e E r r o r : a r g u m e n t s h o u l d b e a B u f f e r / ) ;
10611062
10621063const regErrorMsg = new RegExp ( 'First argument must be a string, Buffer, ' +
10631064 'ArrayBuffer, Array, or array-like object.' ) ;
@@ -1066,10 +1067,10 @@ assert.throws(() => Buffer.from(), regErrorMsg);
10661067assert . throws ( ( ) => Buffer . from ( null ) , regErrorMsg ) ;
10671068
10681069// Test prototype getters don't throw
1069- assert . equal ( Buffer . prototype . parent , undefined ) ;
1070- assert . equal ( Buffer . prototype . offset , undefined ) ;
1071- assert . equal ( SlowBuffer . prototype . parent , undefined ) ;
1072- assert . equal ( SlowBuffer . prototype . offset , undefined ) ;
1070+ assert . strictEqual ( Buffer . prototype . parent , undefined ) ;
1071+ assert . strictEqual ( Buffer . prototype . offset , undefined ) ;
1072+ assert . strictEqual ( SlowBuffer . prototype . parent , undefined ) ;
1073+ assert . strictEqual ( SlowBuffer . prototype . offset , undefined ) ;
10731074
10741075
10751076{
@@ -1095,7 +1096,7 @@ assert.throws(() => {
10951096 const a = Buffer . alloc ( 1 ) ;
10961097 const b = Buffer . alloc ( 1 ) ;
10971098 a . copy ( b , 0 , 0x100000000 , 0x100000001 ) ;
1098- } ) , / o u t o f r a n g e i n d e x / ;
1099+ } , / o u t o f r a n g e i n d e x / ) ;
10991100
11001101// Unpooled buffer (replaces SlowBuffer)
11011102{
0 commit comments