|
1 | 1 | /**
|
2 | 2 | * @license Apache-2.0
|
3 | 3 | *
|
4 |
| -* Copyright (c) 2022 The Stdlib Authors. |
| 4 | +* Copyright (c) 2023 The Stdlib Authors. |
5 | 5 | *
|
6 | 6 | * Licensed under the Apache License, Version 2.0 (the "License");
|
7 | 7 | * you may not use this file except in compliance with the License.
|
|
21 | 21 | // MODULES //
|
22 | 22 |
|
23 | 23 | var tape = require( 'tape' );
|
24 |
| -var PINF = require( '@stdlib/constants-float64-pinf' ); |
25 |
| -var NINF = require( '@stdlib/constants-float64-ninf' ); |
26 |
| -var isNonPositiveFinite = require( './../../dist' ); |
| 24 | +var main = require( './../../dist' ); |
27 | 25 |
|
28 | 26 |
|
29 | 27 | // TESTS //
|
30 | 28 |
|
31 |
| -tape( 'main export is a function', function test( t ) { |
| 29 | +tape( 'main export is defined', function test( t ) { |
32 | 30 | t.ok( true, __filename );
|
33 |
| - t.strictEqual( typeof isNonPositiveFinite, 'function', 'main export is a function' ); |
34 |
| - t.end(); |
35 |
| -}); |
36 |
| - |
37 |
| -tape( 'the function returns `true` if provided a nonpositive finite number', function test( t ) { |
38 |
| - t.equal( isNonPositiveFinite( -3.14 ), true, 'returns true' ); |
39 |
| - t.equal( isNonPositiveFinite( 0.0 ), true, 'returns true' ); |
40 |
| - t.equal( isNonPositiveFinite( -0.0 ), true, 'returns true' ); |
41 |
| - t.end(); |
42 |
| -}); |
43 |
| - |
44 |
| -tape( 'the function returns `false` if provided a positive number', function test( t ) { |
45 |
| - var bool = isNonPositiveFinite( 3.14 ); |
46 |
| - t.equal( bool, false, 'returns false' ); |
47 |
| - t.end(); |
48 |
| -}); |
49 |
| - |
50 |
| -tape( 'the function returns `false` if provided `NaN`', function test( t ) { |
51 |
| - var bool = isNonPositiveFinite( NaN ); |
52 |
| - t.equal( bool, false, 'returns false' ); |
53 |
| - t.end(); |
54 |
| -}); |
55 |
| - |
56 |
| -tape( 'the function returns `false` if provided positive infinity', function test( t ) { |
57 |
| - var bool = isNonPositiveFinite( PINF ); |
58 |
| - t.equal( bool, false, 'returns false' ); |
59 |
| - t.end(); |
60 |
| -}); |
61 |
| - |
62 |
| -tape( 'the function returns `false` if provided negative infinity', function test( t ) { |
63 |
| - var bool = isNonPositiveFinite( NINF ); |
64 |
| - t.equal( bool, false, 'returns false' ); |
65 |
| - t.end(); |
66 |
| -}); |
67 |
| - |
68 |
| -tape( 'the function returns `false` if provided `NaN`', function test( t ) { |
69 |
| - var bool = isNonPositiveFinite( NaN ); |
70 |
| - t.equal( bool, false, 'returns false' ); |
| 31 | + t.strictEqual( main !== void 0, true, 'main export is defined' ); |
71 | 32 | t.end();
|
72 | 33 | });
|
0 commit comments