Skip to content

Commit f9651e6

Browse files
committed
test: use .strictEqual() instead of .equal() and fix lint errors
--- 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 842892d commit f9651e6

File tree

439 files changed

+2133
-2132
lines changed

Some content is hidden

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

439 files changed

+2133
-2132
lines changed

lib/node_modules/@stdlib/assert/contains/test/test.js

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,13 @@ tape( 'the function returns `true` when a search string is contained in input st
129129
var out;
130130

131131
out = contains( 'Hello World', 'World' );
132-
t.equal( out, true, 'returns expected value' );
132+
t.strictEqual( out, true, 'returns expected value' );
133133

134134
out = contains( 'Hello World', ' ' );
135-
t.equal( out, true, 'returns expected value' );
135+
t.strictEqual( out, true, 'returns expected value' );
136136

137137
out = contains( 'Hello World', 'Hell' );
138-
t.equal( out, true, 'returns expected value' );
138+
t.strictEqual( out, true, 'returns expected value' );
139139

140140
t.end();
141141
});
@@ -144,13 +144,13 @@ tape( 'the function returns `false` when a search string is not contained in inp
144144
var out;
145145

146146
out = contains( 'Hello World', 'world' );
147-
t.equal( out, false, 'returns expected value' );
147+
t.strictEqual( out, false, 'returns expected value' );
148148

149149
out = contains( 'Hello World', '\t' );
150-
t.equal( out, false, 'returns expected value' );
150+
t.strictEqual( out, false, 'returns expected value' );
151151

152152
out = contains( 'Hello World', 'Word' );
153-
t.equal( out, false, 'returns expected value' );
153+
t.strictEqual( out, false, 'returns expected value' );
154154

155155
t.end();
156156
});
@@ -159,13 +159,13 @@ tape( 'the function returns `true` when a search value is contained in input arr
159159
var out;
160160

161161
out = contains( [ NaN, null, 3, 'abc' ], 'abc' );
162-
t.equal( out, true, 'returns expected value' );
162+
t.strictEqual( out, true, 'returns expected value' );
163163

164164
out = contains( [ NaN, null, 3, 'abc' ], NaN );
165-
t.equal( out, true, 'returns expected value' );
165+
t.strictEqual( out, true, 'returns expected value' );
166166

167167
out = contains( [ NaN, null, 3, 'abc' ], null );
168-
t.equal( out, true, 'returns expected value' );
168+
t.strictEqual( out, true, 'returns expected value' );
169169

170170
t.end();
171171
});
@@ -174,13 +174,13 @@ tape( 'the function returns `false` when search value is not contained in input
174174
var out;
175175

176176
out = contains( [ NaN, null, 3, 'abc' ], 'ac' );
177-
t.equal( out, false, 'returns expected value' );
177+
t.strictEqual( out, false, 'returns expected value' );
178178

179179
out = contains( [ NaN, null, 3, 'abc' ], false );
180-
t.equal( out, false, 'returns expected value' );
180+
t.strictEqual( out, false, 'returns expected value' );
181181

182182
out = contains( [ NaN, null, 3, 'abc' ], 3.5 );
183-
t.equal( out, false, 'returns expected value' );
183+
t.strictEqual( out, false, 'returns expected value' );
184184

185185
t.end();
186186
});
@@ -189,50 +189,50 @@ tape( 'the function supports beginning a search at the specified position', func
189189
var out;
190190

191191
out = contains( 'ABCDEFG', 'A', 1 );
192-
t.equal( out, false, 'returns expected value' );
192+
t.strictEqual( out, false, 'returns expected value' );
193193

194194
out = contains( 'ABCDEFG', 'B', 1 );
195-
t.equal( out, true, 'returns expected value' );
195+
t.strictEqual( out, true, 'returns expected value' );
196196

197197
out = contains( 'ABCDEFG', 'A', -3 );
198-
t.equal( out, true, 'returns expected value' );
198+
t.strictEqual( out, true, 'returns expected value' );
199199

200200
out = contains( [ null, NaN, 2 ], 3, 1 );
201-
t.equal( out, false, 'returns expected value' );
201+
t.strictEqual( out, false, 'returns expected value' );
202202

203203
out = contains( [ null, NaN, 2 ], NaN, 1 );
204-
t.equal( out, true, 'returns expected value' );
204+
t.strictEqual( out, true, 'returns expected value' );
205205

206206
out = contains( [ null, NaN, 2 ], NaN, -3 );
207-
t.equal( out, true, 'returns expected value' );
207+
t.strictEqual( out, true, 'returns expected value' );
208208

209209
out = contains( [ null, NaN, 2 ], NaN, 2 );
210-
t.equal( out, false, 'returns expected value' );
210+
t.strictEqual( out, false, 'returns expected value' );
211211

212212
t.end();
213213
});
214214

215215
tape( 'the function returns `true` if provided an input string and an empty string as the search value', function test( t ) {
216-
t.equal( contains( 'abc', '' ), true, 'returns expected value' );
217-
t.equal( contains( '', '' ), true, 'returns expected value' );
216+
t.strictEqual( contains( 'abc', '' ), true, 'returns expected value' );
217+
t.strictEqual( contains( '', '' ), true, 'returns expected value' );
218218
t.end();
219219
});
220220

221221
tape( 'the function returns `false` if provided an empty array-like value', function test( t ) {
222-
t.equal( contains( [], '' ), false, 'returns expected value' );
222+
t.strictEqual( contains( [], '' ), false, 'returns expected value' );
223223
t.end();
224224
});
225225

226226
tape( 'the function does distinguish between positive and negative zero', function test( t ) {
227-
t.equal( contains( [ -0.0 ], +0.0 ), false, 'returns expected value' );
228-
t.equal( contains( [ +0.0 ], -0.0 ), false, 'returns expected value' );
229-
t.equal( contains( [ -0.0 ], -0.0 ), true, 'returns expected value' );
230-
t.equal( contains( [ +0.0 ], +0.0 ), true, 'returns expected value' );
227+
t.strictEqual( contains( [ -0.0 ], +0.0 ), false, 'returns expected value' );
228+
t.strictEqual( contains( [ +0.0 ], -0.0 ), false, 'returns expected value' );
229+
t.strictEqual( contains( [ -0.0 ], -0.0 ), true, 'returns expected value' );
230+
t.strictEqual( contains( [ +0.0 ], +0.0 ), true, 'returns expected value' );
231231
t.end();
232232
});
233233

234234
tape( 'the function returns `false` if provided a position which exceeds the maximum index', function test( t ) {
235-
t.equal( contains( [ 1 ], 1, 1e5 ), false, 'returns expected value' );
236-
t.equal( contains( 'abc', 'a', 1e5 ), false, 'returns expected value' );
235+
t.strictEqual( contains( [ 1 ], 1, 1e5 ), false, 'returns expected value' );
236+
t.strictEqual( contains( 'abc', 'a', 1e5 ), false, 'returns expected value' );
237237
t.end();
238238
});

lib/node_modules/@stdlib/assert/is-absolute-path/test/test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,24 @@ tape( 'if platform is POSIX, main export is method to test if a string is a POSI
3737
var isAbsolutePath = proxyquire( './../lib', {
3838
'@stdlib/assert/is-windows': false
3939
});
40-
t.equal( isAbsolutePath, isAbsolutePath.posix, 'equals posix method' );
40+
t.strictEqual( isAbsolutePath, isAbsolutePath.posix, 'equals posix method' );
4141
t.end();
4242
});
4343

4444
tape( 'if platform is Windows, main export is method to test if a string is a Windows absolute path', function test( t ) {
4545
var isAbsolutePath = proxyquire( './../lib', {
4646
'@stdlib/assert/is-windows': true
4747
});
48-
t.equal( isAbsolutePath, isAbsolutePath.win32, 'equals win32 method' );
48+
t.strictEqual( isAbsolutePath, isAbsolutePath.win32, 'equals win32 method' );
4949
t.end();
5050
});
5151

5252
tape( 'attached to the main export is a method to test if a string is a POSIX absolute path', function test( t ) {
53-
t.equal( typeof isAbsolutePath.posix, 'function', 'has a posix method' );
53+
t.strictEqual( typeof isAbsolutePath.posix, 'function', 'has a posix method' );
5454
t.end();
5555
});
5656

5757
tape( 'attached to the main export is a method to test if a string is a Windows absolute path', function test( t ) {
58-
t.equal( typeof isAbsolutePath.win32, 'function', 'has a win32 method' );
58+
t.strictEqual( typeof isAbsolutePath.win32, 'function', 'has a win32 method' );
5959
t.end();
6060
});

lib/node_modules/@stdlib/assert/is-absolute-path/test/test.posix.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ tape( 'the function returns `false` if not provided a string', function test( t
4949
];
5050
for ( i = 0; i < values.length; i++ ) {
5151
bool = isAbsolutePath( values[ i ] );
52-
t.equal( bool, false, 'returns `false` when provided '+values[i] );
52+
t.strictEqual( bool, false, 'returns `false` when provided '+values[i] );
5353
}
5454
t.end();
5555
});

lib/node_modules/@stdlib/assert/is-absolute-path/test/test.win32.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ tape( 'the function returns `false` if not provided a string', function test( t
4949
];
5050
for ( i = 0; i < values.length; i++ ) {
5151
bool = isAbsolutePath( values[ i ] );
52-
t.equal( bool, false, 'returns `false` when provided '+values[i] );
52+
t.strictEqual( bool, false, 'returns `false` when provided '+values[i] );
5353
}
5454
t.end();
5555
});

lib/node_modules/@stdlib/assert/is-accessor-property-in/test/test.js

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ tape( 'the function returns `true` if an object property has an accessor descrip
5959
});
6060

6161
bool = isAccessorPropertyIn( obj, 'a' );
62-
t.equal( bool, true, 'returns true' );
62+
t.strictEqual( bool, true, 'returns true' );
6363

6464
bool = isAccessorPropertyIn( obj, 'b' );
65-
t.equal( bool, true, 'returns true' );
65+
t.strictEqual( bool, true, 'returns true' );
6666

6767
bool = isAccessorPropertyIn( obj, 'c' );
68-
t.equal( bool, true, 'returns true' );
68+
t.strictEqual( bool, true, 'returns true' );
6969

7070
t.end();
7171

@@ -108,13 +108,13 @@ tape( 'the function returns `true` if provided an inherited property having an a
108108
obj = new Foo();
109109

110110
bool = isAccessorPropertyIn( obj, 'a' );
111-
t.equal( bool, true, 'returns true' );
111+
t.strictEqual( bool, true, 'returns true' );
112112

113113
bool = isAccessorPropertyIn( obj, 'b' );
114-
t.equal( bool, true, 'returns true' );
114+
t.strictEqual( bool, true, 'returns true' );
115115

116116
bool = isAccessorPropertyIn( obj, 'c' );
117-
t.equal( bool, true, 'returns true' );
117+
t.strictEqual( bool, true, 'returns true' );
118118

119119
t.end();
120120

@@ -140,19 +140,19 @@ tape( 'the function returns `false` if an object property has a data descriptor'
140140
'a': 'b'
141141
};
142142
bool = isAccessorPropertyIn( obj, 'a' );
143-
t.equal( bool, false, 'returns false' );
143+
t.strictEqual( bool, false, 'returns false' );
144144

145145
bool = isAccessorPropertyIn( [ 1, 2, 3 ], '1' );
146-
t.equal( bool, false, 'returns false' );
146+
t.strictEqual( bool, false, 'returns false' );
147147

148148
bool = isAccessorPropertyIn( [ 1, 2, 3 ], 1 );
149-
t.equal( bool, false, 'returns false' );
149+
t.strictEqual( bool, false, 'returns false' );
150150

151151
bool = isAccessorPropertyIn( new Foo(), 'bar' );
152-
t.equal( bool, false, 'returns false' );
152+
t.strictEqual( bool, false, 'returns false' );
153153

154154
bool = isAccessorPropertyIn( [ 'a' ], 'length' );
155-
t.equal( bool, false, 'returns false' );
155+
t.strictEqual( bool, false, 'returns false' );
156156

157157
obj = {};
158158
defineProperty( obj, 'a', {
@@ -163,7 +163,7 @@ tape( 'the function returns `false` if an object property has a data descriptor'
163163
});
164164

165165
bool = isAccessorPropertyIn( obj, 'a' );
166-
t.equal( bool, false, 'returns false' );
166+
t.strictEqual( bool, false, 'returns false' );
167167

168168
t.end();
169169
});
@@ -172,10 +172,10 @@ tape( 'the function returns `false` if provided `null` or `undefined` for the fi
172172
var bool;
173173

174174
bool = isAccessorPropertyIn( null, 'beep' );
175-
t.equal( bool, false, 'returns false when provided null' );
175+
t.strictEqual( bool, false, 'returns false when provided null' );
176176

177177
bool = isAccessorPropertyIn( void 0, 'beep' );
178-
t.equal( bool, false, 'returns false when provided undefined' );
178+
t.strictEqual( bool, false, 'returns false when provided undefined' );
179179

180180
t.end();
181181
});
@@ -189,10 +189,10 @@ tape( 'the function returns `false` if provided a property argument which does n
189189
};
190190

191191
bool = isAccessorPropertyIn( obj, 'c' );
192-
t.equal( bool, false, 'returns false' );
192+
t.strictEqual( bool, false, 'returns false' );
193193

194194
bool = isAccessorPropertyIn( obj, 'd' );
195-
t.equal( bool, false, 'returns false' );
195+
t.strictEqual( bool, false, 'returns false' );
196196

197197
t.end();
198198
});
@@ -215,16 +215,16 @@ tape( 'the function returns `false` if provided an inherited property having a d
215215
obj = new Foo();
216216

217217
bool = isAccessorPropertyIn( obj, 'a' );
218-
t.equal( bool, false, 'returns false' );
218+
t.strictEqual( bool, false, 'returns false' );
219219

220220
bool = isAccessorPropertyIn( {}, 'hasOwnProperty' );
221-
t.equal( bool, false, 'returns false' );
221+
t.strictEqual( bool, false, 'returns false' );
222222

223223
bool = isAccessorPropertyIn( {}, 'toString' );
224-
t.equal( bool, false, 'returns false' );
224+
t.strictEqual( bool, false, 'returns false' );
225225

226226
bool = isAccessorPropertyIn( {}, 'constructor' );
227-
t.equal( bool, false, 'returns false' );
227+
t.strictEqual( bool, false, 'returns false' );
228228

229229
t.end();
230230
});
@@ -233,7 +233,7 @@ tape( 'values are coerced to objects', function test( t ) {
233233
var bool;
234234

235235
bool = isAccessorPropertyIn( 'beep', 'length' );
236-
t.equal( bool, false, 'returns false' );
236+
t.strictEqual( bool, false, 'returns false' );
237237

238238
t.end();
239239
});

0 commit comments

Comments
 (0)