From b9a309e9b7e5ad0d6fb2ac1124ce27c6ed94587e Mon Sep 17 00:00:00 2001 From: surajgoraicse Date: Thu, 25 Dec 2025 09:46:56 +0530 Subject: [PATCH] fix(lint): replace new Array() with sparse array literals in tests --- .../@stdlib/math/strided/special/cos-by/test/test.main.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/math/strided/special/cos-by/test/test.main.js b/lib/node_modules/@stdlib/math/strided/special/cos-by/test/test.main.js index 1694e4ad6ddf..93074fea5e8f 100644 --- a/lib/node_modules/@stdlib/math/strided/special/cos-by/test/test.main.js +++ b/lib/node_modules/@stdlib/math/strided/special/cos-by/test/test.main.js @@ -74,7 +74,9 @@ tape( 'the function computes the cosine via a callback function', function test( cosBy( x.length, x, 1, y, 1, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array + let x = []; // sparse array + x.length = 5; + y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; expected = [ 0.0, 0.0, 0.0, 0.0, 0.0 ]; @@ -82,7 +84,9 @@ tape( 'the function computes the cosine via a callback function', function test( cosBy( x.length, x, 1, y, 1, accessor ); t.deepEqual( y, expected, 'deep equal' ); - x = new Array( 5 ); // sparse array + let x = []; // sparse array + x.length = 5; + x[ 2 ] = rand(); y = [ 0.0, 0.0, 0.0, 0.0, 0.0 ];