Skip to content

Commit

Permalink
fix: added missing test for toReversed method in array/fixed-endian-f…
Browse files Browse the repository at this point in the history
…actory
  • Loading branch information
nate10j committed Dec 1, 2024
1 parent f84a8e1 commit e3001fa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ var tape = require( 'tape' );
var hasOwnProp = require( '@stdlib/assert/has-own-property' );
var isFunction = require( '@stdlib/assert/is-function' );
var instanceOf = require( '@stdlib/assert/instance-of' );
var Uint8Array = require( '@stdlib/array/uint8' );
var factory = require( './../lib' );


Expand Down Expand Up @@ -97,11 +96,12 @@ tape( 'the method returns a new typed array containing elements in reverse order

ctor = factory( 'float64' );
arr = new ctor( 'little-endian', [ 1.0, 2.0, 3.0, 4.0 ] );
expected = new Uint8Array( [ 4.0, 3.0, 2.0, 1.0 ] );
expected = new ctor( 'little-endian', [ 4.0, 3.0, 2.0, 1.0 ] );
out = arr.toReversed();

t.strictEqual( instanceOf( out, ctor ), true, 'returns expected value' );
t.notEqual( out, arr, 'returns a new instance' );
t.deepEqual( out, expected, 'returns expected value' );
t.strictEqual( out.length, expected.length, 'returns expected value' );
t.end();
});
Expand Down

0 comments on commit e3001fa

Please sign in to comment.