Skip to content

Commit 9c21fd2

Browse files
committed
test: use .strictEqual() instead of .equal()
--- 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 a147b7d commit 9c21fd2

File tree

1,295 files changed

+14640
-14640
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,295 files changed

+14640
-14640
lines changed

lib/node_modules/@stdlib/stats/base/dists/arcsine/cdf/test/test.factory.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ tape( 'main export is a function', function test( t ) {
4646

4747
tape( 'the function returns a function', function test( t ) {
4848
var cdf = factory( 0.0, 1.0 );
49-
t.equal( typeof cdf, 'function', 'returns a function' );
49+
t.strictEqual( typeof cdf, 'function', 'returns a function' );
5050
t.end();
5151
});
5252

@@ -56,23 +56,23 @@ tape( 'if provided `NaN` for any parameter, the created function returns `NaN`',
5656

5757
cdf = factory( 0.0, 1.0 );
5858
y = cdf( NaN );
59-
t.equal( isnan( y ), true, 'returns NaN' );
59+
t.strictEqual( isnan( y ), true, 'returns NaN' );
6060

6161
cdf = factory( NaN, 1.0 );
6262
y = cdf( 0.0 );
63-
t.equal( isnan( y ), true, 'returns NaN' );
63+
t.strictEqual( isnan( y ), true, 'returns NaN' );
6464

6565
cdf = factory( 1.0, NaN );
6666
y = cdf( 0.0 );
67-
t.equal( isnan( y ), true, 'returns NaN' );
67+
t.strictEqual( isnan( y ), true, 'returns NaN' );
6868

6969
cdf = factory( NaN, NaN );
7070
y = cdf( 0.0 );
71-
t.equal( isnan( y ), true, 'returns NaN' );
71+
t.strictEqual( isnan( y ), true, 'returns NaN' );
7272

7373
cdf = factory( NaN, NaN );
7474
y = cdf( NaN );
75-
t.equal( isnan( y ), true, 'returns NaN' );
75+
t.strictEqual( isnan( y ), true, 'returns NaN' );
7676

7777
t.end();
7878
});
@@ -83,7 +83,7 @@ tape( 'if provided a finite `a` and `b`, the function returns a function which r
8383

8484
cdf = factory( 0.0, 1.0 );
8585
y = cdf( PINF );
86-
t.equal( y, 1.0, 'returns 1' );
86+
t.strictEqual( y, 1.0, 'returns 1' );
8787

8888
t.end();
8989
});
@@ -94,7 +94,7 @@ tape( 'if provided a finite `a` and `b`, the function returns a function which r
9494

9595
cdf = factory( 0, 1.0 );
9696
y = cdf( NINF );
97-
t.equal( y, 0.0, 'returns 0' );
97+
t.strictEqual( y, 0.0, 'returns 0' );
9898

9999
t.end();
100100
});
@@ -106,26 +106,26 @@ tape( 'if provided a `a >= b`, the created function always returns `NaN`', funct
106106
cdf = factory( 2.0, 1.0 );
107107

108108
y = cdf( 2.0 );
109-
t.equal( isnan( y ), true, 'returns NaN' );
109+
t.strictEqual( isnan( y ), true, 'returns NaN' );
110110

111111
y = cdf( 0.0 );
112-
t.equal( isnan( y ), true, 'returns NaN' );
112+
t.strictEqual( isnan( y ), true, 'returns NaN' );
113113

114114
cdf = factory( 0.0, NINF );
115115
y = cdf( 2.0 );
116-
t.equal( isnan( y ), true, 'returns NaN' );
116+
t.strictEqual( isnan( y ), true, 'returns NaN' );
117117

118118
cdf = factory( PINF, NINF );
119119
y = cdf( 2.0 );
120-
t.equal( isnan( y ), true, 'returns NaN' );
120+
t.strictEqual( isnan( y ), true, 'returns NaN' );
121121

122122
cdf = factory( NINF, NINF );
123123
y = cdf( 2.0 );
124-
t.equal( isnan( y ), true, 'returns NaN' );
124+
t.strictEqual( isnan( y ), true, 'returns NaN' );
125125

126126
cdf = factory( -1.0, -2.0 );
127127
y = cdf( 2.0 );
128-
t.equal( isnan( y ), true, 'returns NaN' );
128+
t.strictEqual( isnan( y ), true, 'returns NaN' );
129129

130130
t.end();
131131
});
@@ -149,7 +149,7 @@ tape( 'the created function evaluates the cdf for `x` given a small range `b - a
149149
cdf = factory( a[i], b[i] );
150150
y = cdf( x[i] );
151151
if ( y === expected[i] ) {
152-
t.equal( y, expected[i], 'x: '+x[i]+', a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
152+
t.strictEqual( y, expected[i], 'x: '+x[i]+', a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
153153
} else {
154154
delta = abs( y - expected[ i ] );
155155
tol = 2.0 * EPS * abs( expected[ i ] );
@@ -178,7 +178,7 @@ tape( 'the created function evaluates the cdf for `x` given a medium range `b -
178178
cdf = factory( a[i], b[i] );
179179
y = cdf( x[i] );
180180
if ( y === expected[i] ) {
181-
t.equal( y, expected[i], 'x: '+x[i]+', a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
181+
t.strictEqual( y, expected[i], 'x: '+x[i]+', a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
182182
} else {
183183
delta = abs( y - expected[ i ] );
184184
tol = 2.0 * EPS * abs( expected[ i ] );
@@ -207,7 +207,7 @@ tape( 'the created function evaluates the cdf for `x` given a large range `b - a
207207
cdf = factory( a[i], b[i] );
208208
y = cdf( x[i] );
209209
if ( y === expected[i] ) {
210-
t.equal( y, expected[i], 'x: '+x[i]+', a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
210+
t.strictEqual( y, expected[i], 'x: '+x[i]+', a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
211211
} else {
212212
delta = abs( y - expected[ i ] );
213213
tol = 2.0 * EPS * abs( expected[ i ] );

lib/node_modules/@stdlib/stats/base/dists/arcsine/cdf/test/test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ tape( 'main export is a function', function test( t ) {
3333
});
3434

3535
tape( 'attached to the main export is a factory method for generating `cdf` functions', function test( t ) {
36-
t.equal( typeof cdf.factory, 'function', 'exports a factory method' );
36+
t.strictEqual( typeof cdf.factory, 'function', 'exports a factory method' );
3737
t.end();
3838
});

lib/node_modules/@stdlib/stats/base/dists/arcsine/cdf/test/test.main.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,40 +46,40 @@ tape( 'main export is a function', function test( t ) {
4646

4747
tape( 'if provided `NaN` for any parameter, the function returns `NaN`', function test( t ) {
4848
var y = cdf( NaN, 0.0, 1.0 );
49-
t.equal( isnan( y ), true, 'returns NaN' );
49+
t.strictEqual( isnan( y ), true, 'returns NaN' );
5050
y = cdf( 0.0, NaN, 1.0 );
51-
t.equal( isnan( y ), true, 'returns NaN' );
51+
t.strictEqual( isnan( y ), true, 'returns NaN' );
5252
y = cdf( 0.0, 1.0, NaN );
53-
t.equal( isnan( y ), true, 'returns NaN' );
53+
t.strictEqual( isnan( y ), true, 'returns NaN' );
5454
t.end();
5555
});
5656

5757
tape( 'if provided `+infinity` for `x` and a valid `a` and `b`, the function returns `1`', function test( t ) {
5858
var y = cdf( PINF, 0.5, 1.0 );
59-
t.equal( y, 1.0, 'returns 1' );
59+
t.strictEqual( y, 1.0, 'returns 1' );
6060
t.end();
6161
});
6262

6363
tape( 'if provided `-infinity` for `x` and a valid `a` and `b`, the function returns `0`', function test( t ) {
6464
var y = cdf( NINF, 0.5, 1.0 );
65-
t.equal( y, 0.0, 'returns 0' );
65+
t.strictEqual( y, 0.0, 'returns 0' );
6666
t.end();
6767
});
6868

6969
tape( 'if provided `a >= b`, the function returns `NaN`', function test( t ) {
7070
var y;
7171

7272
y = cdf( 2.0, -1.0, -1.0 );
73-
t.equal( isnan( y ), true, 'returns NaN' );
73+
t.strictEqual( isnan( y ), true, 'returns NaN' );
7474

7575
y = cdf( 0.0, 3.0, 2.0 );
76-
t.equal( isnan( y ), true, 'returns NaN' );
76+
t.strictEqual( isnan( y ), true, 'returns NaN' );
7777

7878
y = cdf( 0.0, 0.0, 0.0 );
79-
t.equal( isnan( y ), true, 'returns NaN' );
79+
t.strictEqual( isnan( y ), true, 'returns NaN' );
8080

8181
y = cdf( 0.0, -0.5, -1.0 );
82-
t.equal( isnan( y ), true, 'returns NaN' );
82+
t.strictEqual( isnan( y ), true, 'returns NaN' );
8383

8484
t.end();
8585
});
@@ -101,7 +101,7 @@ tape( 'the function evaluates the cdf for `x` given a small range `b - a`', func
101101
for ( i = 0; i < x.length; i++ ) {
102102
y = cdf( x[i], a[i], b[i] );
103103
if ( y === expected[i] ) {
104-
t.equal( y, expected[i], 'x: '+x[i]+', a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
104+
t.strictEqual( y, expected[i], 'x: '+x[i]+', a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
105105
} else {
106106
delta = abs( y - expected[ i ] );
107107
tol = 2.0 * EPS * abs( expected[ i ] );
@@ -128,7 +128,7 @@ tape( 'the function evaluates the cdf for `x` given a medium range `b - a`', fun
128128
for ( i = 0; i < x.length; i++ ) {
129129
y = cdf( x[i], a[i], b[i] );
130130
if ( y === expected[i] ) {
131-
t.equal( y, expected[i], 'x: '+x[i]+', a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
131+
t.strictEqual( y, expected[i], 'x: '+x[i]+', a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
132132
} else {
133133
delta = abs( y - expected[ i ] );
134134
tol = 2.0 * EPS * abs( expected[ i ] );
@@ -155,7 +155,7 @@ tape( 'the function evaluates the cdf for `x` given a large range `b - a`', func
155155
for ( i = 0; i < x.length; i++ ) {
156156
y = cdf( x[i], a[i], b[i] );
157157
if ( y === expected[i] ) {
158-
t.equal( y, expected[i], 'x: '+x[i]+', a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
158+
t.strictEqual( y, expected[i], 'x: '+x[i]+', a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
159159
} else {
160160
delta = abs( y - expected[ i ] );
161161
tol = 2.0 * EPS * abs( expected[ i ] );

lib/node_modules/@stdlib/stats/base/dists/arcsine/cdf/test/test.native.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,40 +55,40 @@ tape( 'main export is a function', opts, function test( t ) {
5555

5656
tape( 'if provided `NaN` for any parameter, the function returns `NaN`', opts, function test( t ) {
5757
var y = cdf( NaN, 0.0, 1.0 );
58-
t.equal( isnan( y ), true, 'returns NaN' );
58+
t.strictEqual( isnan( y ), true, 'returns NaN' );
5959
y = cdf( 0.0, NaN, 1.0 );
60-
t.equal( isnan( y ), true, 'returns NaN' );
60+
t.strictEqual( isnan( y ), true, 'returns NaN' );
6161
y = cdf( 0.0, 1.0, NaN );
62-
t.equal( isnan( y ), true, 'returns NaN' );
62+
t.strictEqual( isnan( y ), true, 'returns NaN' );
6363
t.end();
6464
});
6565

6666
tape( 'if provided `+infinity` for `x` and a valid `a` and `b`, the function returns `1`', opts, function test( t ) {
6767
var y = cdf( PINF, 0.5, 1.0 );
68-
t.equal( y, 1.0, 'returns 1' );
68+
t.strictEqual( y, 1.0, 'returns 1' );
6969
t.end();
7070
});
7171

7272
tape( 'if provided `-infinity` for `x` and a valid `a` and `b`, the function returns `0`', opts, function test( t ) {
7373
var y = cdf( NINF, 0.5, 1.0 );
74-
t.equal( y, 0.0, 'returns 0' );
74+
t.strictEqual( y, 0.0, 'returns 0' );
7575
t.end();
7676
});
7777

7878
tape( 'if provided `a >= b`, the function returns `NaN`', opts, function test( t ) {
7979
var y;
8080

8181
y = cdf( 2.0, -1.0, -1.0 );
82-
t.equal( isnan( y ), true, 'returns NaN' );
82+
t.strictEqual( isnan( y ), true, 'returns NaN' );
8383

8484
y = cdf( 0.0, 3.0, 2.0 );
85-
t.equal( isnan( y ), true, 'returns NaN' );
85+
t.strictEqual( isnan( y ), true, 'returns NaN' );
8686

8787
y = cdf( 0.0, 0.0, 0.0 );
88-
t.equal( isnan( y ), true, 'returns NaN' );
88+
t.strictEqual( isnan( y ), true, 'returns NaN' );
8989

9090
y = cdf( 0.0, -0.5, -1.0 );
91-
t.equal( isnan( y ), true, 'returns NaN' );
91+
t.strictEqual( isnan( y ), true, 'returns NaN' );
9292

9393
t.end();
9494
});
@@ -110,7 +110,7 @@ tape( 'the function evaluates the cdf for `x` given a small range `b - a`', opts
110110
for ( i = 0; i < x.length; i++ ) {
111111
y = cdf( x[i], a[i], b[i] );
112112
if ( y === expected[i] ) {
113-
t.equal( y, expected[i], 'x: '+x[i]+', a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
113+
t.strictEqual( y, expected[i], 'x: '+x[i]+', a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
114114
} else {
115115
delta = abs( y - expected[ i ] );
116116
tol = 2.0 * EPS * abs( expected[ i ] );
@@ -137,7 +137,7 @@ tape( 'the function evaluates the cdf for `x` given a medium range `b - a`', opt
137137
for ( i = 0; i < x.length; i++ ) {
138138
y = cdf( x[i], a[i], b[i] );
139139
if ( y === expected[i] ) {
140-
t.equal( y, expected[i], 'x: '+x[i]+', a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
140+
t.strictEqual( y, expected[i], 'x: '+x[i]+', a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
141141
} else {
142142
delta = abs( y - expected[ i ] );
143143
tol = 2.0 * EPS * abs( expected[ i ] );
@@ -164,7 +164,7 @@ tape( 'the function evaluates the cdf for `x` given a large range `b - a`', opts
164164
for ( i = 0; i < x.length; i++ ) {
165165
y = cdf( x[i], a[i], b[i] );
166166
if ( y === expected[i] ) {
167-
t.equal( y, expected[i], 'x: '+x[i]+', a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
167+
t.strictEqual( y, expected[i], 'x: '+x[i]+', a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
168168
} else {
169169
delta = abs( y - expected[ i ] );
170170
tol = 2.0 * EPS * abs( expected[ i ] );

lib/node_modules/@stdlib/stats/base/dists/arcsine/entropy/test/test.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ tape( 'main export is a function', function test( t ) {
4444

4545
tape( 'if provided `NaN` for any parameter, the function returns `NaN`', function test( t ) {
4646
var v = entropy( NaN, 0.5 );
47-
t.equal( isnan( v ), true, 'returns NaN' );
47+
t.strictEqual( isnan( v ), true, 'returns NaN' );
4848

4949
v = entropy( 10.0, NaN );
50-
t.equal( isnan( v ), true, 'returns NaN' );
50+
t.strictEqual( isnan( v ), true, 'returns NaN' );
5151

5252
t.end();
5353
});
@@ -56,16 +56,16 @@ tape( 'if provided `a >= b`, the function returns `NaN`', function test( t ) {
5656
var y;
5757

5858
y = entropy( 3.0, 2.0 );
59-
t.equal( isnan( y ), true, 'returns NaN' );
59+
t.strictEqual( isnan( y ), true, 'returns NaN' );
6060

6161
y = entropy( 2.0, 2.0 );
62-
t.equal( isnan( y ), true, 'returns NaN' );
62+
t.strictEqual( isnan( y ), true, 'returns NaN' );
6363

6464
y = entropy( NINF, NINF );
65-
t.equal( isnan( y ), true, 'returns NaN' );
65+
t.strictEqual( isnan( y ), true, 'returns NaN' );
6666

6767
y = entropy( PINF, NINF );
68-
t.equal( isnan( y ), true, 'returns NaN' );
68+
t.strictEqual( isnan( y ), true, 'returns NaN' );
6969

7070
t.end();
7171
});
@@ -85,7 +85,7 @@ tape( 'the function returns the differential entropy of an arcsine distribution'
8585
for ( i = 0; i < expected.length; i++ ) {
8686
y = entropy( a[i], b[i] );
8787
if ( y === expected[i] ) {
88-
t.equal( y, expected[i], 'a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
88+
t.strictEqual( y, expected[i], 'a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
8989
} else {
9090
delta = abs( y - expected[ i ] );
9191
tol = 12.0 * EPS * abs( expected[ i ] );

lib/node_modules/@stdlib/stats/base/dists/arcsine/entropy/test/test.native.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ tape( 'main export is a function', opts, function test( t ) {
5353

5454
tape( 'if provided `NaN` for any parameter, the function returns `NaN`', opts, function test( t ) {
5555
var v = entropy( NaN, 0.5 );
56-
t.equal( isnan( v ), true, 'returns NaN' );
56+
t.strictEqual( isnan( v ), true, 'returns NaN' );
5757

5858
v = entropy( 10.0, NaN );
59-
t.equal( isnan( v ), true, 'returns NaN' );
59+
t.strictEqual( isnan( v ), true, 'returns NaN' );
6060

6161
t.end();
6262
});
@@ -65,16 +65,16 @@ tape( 'if provided `a >= b`, the function returns `NaN`', opts, function test( t
6565
var y;
6666

6767
y = entropy( 3.0, 2.0 );
68-
t.equal( isnan( y ), true, 'returns NaN' );
68+
t.strictEqual( isnan( y ), true, 'returns NaN' );
6969

7070
y = entropy( 2.0, 2.0 );
71-
t.equal( isnan( y ), true, 'returns NaN' );
71+
t.strictEqual( isnan( y ), true, 'returns NaN' );
7272

7373
y = entropy( NINF, NINF );
74-
t.equal( isnan( y ), true, 'returns NaN' );
74+
t.strictEqual( isnan( y ), true, 'returns NaN' );
7575

7676
y = entropy( PINF, NINF );
77-
t.equal( isnan( y ), true, 'returns NaN' );
77+
t.strictEqual( isnan( y ), true, 'returns NaN' );
7878

7979
t.end();
8080
});
@@ -94,7 +94,7 @@ tape( 'the function returns the differential entropy of an arcsine distribution'
9494
for ( i = 0; i < expected.length; i++ ) {
9595
y = entropy( a[i], b[i] );
9696
if ( y === expected[i] ) {
97-
t.equal( y, expected[i], 'a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
97+
t.strictEqual( y, expected[i], 'a: '+a[i]+', b: '+b[i]+', y: '+y+', expected: '+expected[i] );
9898
} else {
9999
delta = abs( y - expected[ i ] );
100100
tol = 12.0 * EPS * abs( expected[ i ] );

0 commit comments

Comments
 (0)