Skip to content

Commit 4ed17b6

Browse files
committed
fix: resolve lint errors in truncbf tests
- Remove trailing whitespace from test.js - Add overflow test to test.native.js for consistency - Ensure both test files follow linting rules
1 parent 138b658 commit 4ed17b6

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

lib/node_modules/@stdlib/math/base/special/truncbf/test/test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,13 @@ tape( 'the function returns -infinity if provided -infinity', function test( t )
150150

151151
tape( 'the function handles scale factor overflow gracefully', function test( t ) {
152152
var v;
153-
153+
154154
// When b^n overflows to Infinity, should return x unchanged
155155
v = truncbf( 3.14, 40, 10 );
156156
t.strictEqual( v, float64ToFloat32( 3.14 ), 'handles large exponent' );
157-
157+
158158
v = truncbf( -2.5, 50, 10 );
159159
t.strictEqual( v, float64ToFloat32( -2.5 ), 'handles large exponent with negative x' );
160-
160+
161161
t.end();
162162
});

lib/node_modules/@stdlib/math/base/special/truncbf/test/test.native.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,17 @@ tape( 'the function returns -infinity if provided -infinity', opts, function tes
155155
t.strictEqual( v, NINF, 'returns expected value' );
156156
t.end();
157157
});
158+
159+
tape( 'the function handles scale factor overflow gracefully', opts, function test( t ) {
160+
var float64ToFloat32 = require( '@stdlib/number/float64/base/to-float32' );
161+
var v;
162+
163+
// When b^n overflows to Infinity, should return x unchanged
164+
v = truncbf( 3.14, 40, 10 );
165+
t.strictEqual( v, float64ToFloat32( 3.14 ), 'handles large exponent' );
166+
167+
v = truncbf( -2.5, 50, 10 );
168+
t.strictEqual( v, float64ToFloat32( -2.5 ), 'handles large exponent with negative x' );
169+
170+
t.end();
171+
});

0 commit comments

Comments
 (0)