Skip to content

Commit cf71b85

Browse files
committed
test: use exact equality check against fixtures
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 48e624a commit cf71b85

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

lib/node_modules/@stdlib/stats/base/dists/logistic/kurtosis/test/test.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@
2222

2323
var tape = require( 'tape' );
2424
var isnan = require( '@stdlib/math/base/assert/is-nan' );
25-
var abs = require( '@stdlib/math/base/special/abs' );
2625
var PINF = require( '@stdlib/constants/float64/pinf' );
2726
var NINF = require( '@stdlib/constants/float64/ninf' );
28-
var EPS = require( '@stdlib/constants/float64/eps' );
2927
var kurtosis = require( './../lib' );
3028

3129

@@ -79,8 +77,6 @@ tape( 'if provided a nonpositive `s`, the function returns `NaN`', function test
7977

8078
tape( 'the function returns the excess kurtosis of a logistic distribution', function test( t ) {
8179
var expected;
82-
var delta;
83-
var tol;
8480
var mu;
8581
var s;
8682
var y;
@@ -90,16 +86,8 @@ tape( 'the function returns the excess kurtosis of a logistic distribution', fun
9086
mu = data.mu;
9187
s = data.s;
9288
for ( i = 0; i < mu.length; i++ ) {
93-
y = kurtosis( mu[i], s[i] );
94-
if ( expected[i] !== null ) {
95-
if ( y === expected[i] ) {
96-
t.equal( y, expected[i], 'mu:'+mu[i]+', s: '+s[i]+', y: '+y+', expected: '+expected[i] );
97-
} else {
98-
delta = abs( y - expected[ i ] );
99-
tol = 2.0 * EPS * abs( expected[ i ] );
100-
t.ok( delta <= tol, 'within tolerance. mu: '+mu[i]+'. s: '+s[i]+'. y: '+y+'. E: '+expected[ i ]+'. Δ: '+delta+'. tol: '+tol+'.' );
101-
}
102-
}
89+
y = kurtosis( mu[ i ], s[ i ] );
90+
t.equal( y, expected[ i ], 'mu:'+mu[i]+', s: '+s[i]+', y: '+y+', expected: '+expected[i] );
10391
}
10492
t.end();
10593
});

lib/node_modules/@stdlib/stats/base/dists/logistic/kurtosis/test/test.native.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,8 @@ tape( 'the function returns the excess kurtosis of a logistic distribution', opt
9292
mu = data.mu;
9393
s = data.s;
9494
for ( i = 0; i < mu.length; i++ ) {
95-
y = kurtosis( mu[i], s[i] );
96-
if ( expected[i] !== null ) {
97-
t.equal( y, 1.2, 'mu: ' + mu[i] + ', s: ' + s[i] + ', y: ' + y + ', expected: 1.2' );
98-
}
95+
y = kurtosis( mu[ i ], s[ i ] );
96+
t.equal( y, expected[ i ], 'mu:'+mu[i]+', s: '+s[i]+', y: '+y+', expected: '+expected[i] );
9997
}
10098
t.end();
10199
});

0 commit comments

Comments
 (0)