@@ -138,7 +138,7 @@ assert.doesNotThrow(() => Buffer.alloc(1).write('', 1, 0));
138
138
const sliceA = b . slice ( offset , offset + asciiString . length ) ;
139
139
const sliceB = b . slice ( offset , offset + asciiString . length ) ;
140
140
for ( let i = 0 ; i < asciiString . length ; i ++ ) {
141
- assert . equal ( sliceA [ i ] , sliceB [ i ] ) ;
141
+ assert . strictEqual ( sliceA [ i ] , sliceB [ i ] ) ;
142
142
}
143
143
}
144
144
@@ -149,7 +149,7 @@ assert.doesNotThrow(() => Buffer.alloc(1).write('', 1, 0));
149
149
150
150
b . write ( utf8String , 0 , Buffer . byteLength ( utf8String ) , 'utf8' ) ;
151
151
let utf8Slice = b . toString ( 'utf8' , 0 , Buffer . byteLength ( utf8String ) ) ;
152
- assert . equal ( utf8String , utf8Slice ) ;
152
+ assert . strictEqual ( utf8String , utf8Slice ) ;
153
153
154
154
assert . strictEqual ( Buffer . byteLength ( utf8String ) ,
155
155
b . write ( utf8String , offset , 'utf8' ) ) ;
@@ -1057,7 +1057,8 @@ assert.strictEqual(Buffer.allocUnsafe(1).parent, undefined);
1057
1057
Buffer . poolSize = ps ;
1058
1058
1059
1059
// 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 / ) ;
1061
1062
1062
1063
const regErrorMsg = new RegExp ( 'First argument must be a string, Buffer, ' +
1063
1064
'ArrayBuffer, Array, or array-like object.' ) ;
@@ -1066,10 +1067,10 @@ assert.throws(() => Buffer.from(), regErrorMsg);
1066
1067
assert . throws ( ( ) => Buffer . from ( null ) , regErrorMsg ) ;
1067
1068
1068
1069
// 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 ) ;
1073
1074
1074
1075
1075
1076
{
@@ -1095,7 +1096,7 @@ assert.throws(() => {
1095
1096
const a = Buffer . alloc ( 1 ) ;
1096
1097
const b = Buffer . alloc ( 1 ) ;
1097
1098
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 / ) ;
1099
1100
1100
1101
// Unpooled buffer (replaces SlowBuffer)
1101
1102
{
0 commit comments