Skip to content

Commit 05758a3

Browse files
refactor: update Uint64.from usage in tests to remove unnecessary new keyword
1 parent f4e2f6b commit 05758a3

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

lib/node_modules/@stdlib/number/uint64/ctor/test/test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ tape( 'the constructor prototype has a read-only `byteLength` property', functio
176176
});
177177

178178
tape( 'the constructor returns an instance having a read-only `hi` property for getting the high word', function test( t ) {
179-
var x = new Uint64.from( [ 1, 0 ] );
179+
var x = Uint64.from( [ 1, 0 ] );
180180

181181
t.strictEqual( x.hi, 1, 'returns expected value' );
182182
t.throws( foo, Error, 'throws an error' );
@@ -188,7 +188,7 @@ tape( 'the constructor returns an instance having a read-only `hi` property for
188188
});
189189

190190
tape( 'the constructor returns an instance having a read-only `lo` property for getting the low word', function test( t ) {
191-
var x = new Uint64.from( [ 1, 0 ] );
191+
var x = Uint64.from( [ 1, 0 ] );
192192

193193
t.strictEqual( x.lo, 0, 'returns expected value' );
194194
t.throws( foo, Error, 'throws an error' );
@@ -211,7 +211,7 @@ tape( 'the constructor returns an instance which supports serializing an instanc
211211
t.deepEqual( x.toJSON(), expected, 'returns expected value' );
212212
t.strictEqual( JSON.stringify( x ), JSON.stringify( expected ), 'returns expected value' );
213213

214-
x = new Uint64.from( [ 1, 0 ] );
214+
x = Uint64.from( [ 1, 0 ] );
215215
expected = {
216216
'type': 'Uint64',
217217
'words': [ 1, 0 ]

lib/node_modules/@stdlib/number/uint64/ctor/test/test.to_string.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ tape( 'the constructor returns an instance having a `toString` method for serial
4040
x = new Uint64( 5 );
4141
t.strictEqual( x.toString(), '5', 'returns expected value' );
4242

43-
x = new Uint64.from( [ 1, 0 ] );
43+
x = Uint64.from( [ 1, 0 ] );
4444
t.strictEqual( x.toString(), '4294967296', 'returns expected value' );
4545

4646
t.end();

0 commit comments

Comments
 (0)