File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ var CipherBase = require('../');
55
66var test = require ( 'tape' ) ;
77var inherits = require ( 'inherits' ) ;
8+ const os = require ( 'os' ) ;
89
910test ( 'basic version' , function ( t ) {
1011 function Cipher ( ) {
@@ -212,7 +213,11 @@ test('handle UInt16Array', function (t) {
212213 if ( ArrayBuffer . isView && ( Buffer . prototype instanceof Uint8Array || Buffer . TYPED_ARRAY_SUPPORT ) ) {
213214 var cipher = new Cipher ( ) ;
214215 var final = cipher . update ( new Uint16Array ( [ 1234 , 512 ] ) ) . finalName ( 'hex' ) ;
215- t . equals ( final , 'd2040002' ) ;
216+ if ( os . endianness ( ) === "BE" ) {
217+ t . equals ( final , '04d20200' ) ;
218+ } else {
219+ t . equals ( final , 'd2040002' ) ;
220+ }
216221 } else {
217222 t . skip ( 'ArrayBuffer.isView and/or TypedArray not fully supported' ) ;
218223 }
You can’t perform that action at this time.
0 commit comments