@@ -72,7 +72,19 @@ test('dates', function (t) {
7272
7373test ( 'buffers' , function ( t ) {
7474 /* eslint no-buffer-constructor: 1, new-cap: 1 */
75- t . ok ( equal ( Buffer ( 'xyz' ) , Buffer ( 'xyz' ) ) ) ;
75+ t . ok ( equal ( Buffer ( 'xyz' ) , Buffer ( 'xyz' ) ) , 'buffers with same contents are equal' ) ;
76+ t . ok ( equal ( Buffer ( 'xyz' ) , Buffer ( 'xyz' ) , { strict : true } ) , 'strict: buffers with same contents are equal' ) ;
77+
78+ t . notOk ( equal ( Buffer ( 'abc' ) , Buffer ( 'xyz' ) ) , 'buffers with different contents are not equal' ) ;
79+ t . notOk ( equal ( Buffer ( 'xyz' ) , Buffer ( 'abc' ) ) , 'buffers with different contents are not equal' ) ;
80+ t . notOk ( equal ( Buffer ( 'abc' ) , Buffer ( 'xyz' ) , { strict : true } ) , 'strict: buffers with different contents are not equal' ) ;
81+ t . notOk ( equal ( Buffer ( 'xyz' ) , Buffer ( 'abc' ) , { strict : true } ) , 'strict: buffers with different contents are not equal' ) ;
82+
83+ t . notOk ( equal ( Buffer ( '' ) , [ ] ) , 'empty buffer and empty array are not equal' ) ;
84+ t . notOk ( equal ( [ ] , Buffer ( '' ) ) , 'empty array and empty buffer are not equal' ) ;
85+ t . notOk ( equal ( Buffer ( '' ) , [ ] , { strict : true } ) , 'strict: empty buffer and empty array are not equal' ) ;
86+ t . notOk ( equal ( [ ] , Buffer ( '' ) , { strict : true } ) , 'strict: empty array and empty buffer are not equal' ) ;
87+
7688 t . end ( ) ;
7789} ) ;
7890
0 commit comments