|
1 | 1 | /** |
2 | 2 | * @license Apache-2.0 |
3 | 3 | * |
4 | | -* Copyright (c) 2018 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 Uint8Array = require( '@stdlib/array-uint8' ); |
25 | | -var Number = require( '@stdlib/number-ctor' ); |
26 | | -var isPrimitiveArray = 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 isPrimitiveArray, 'function', 'main export is a function' ); |
34 | | - t.end(); |
35 | | -}); |
36 | | - |
37 | | -tape( 'the function tests for an array-like object containing only primitives', function test( t ) { |
38 | | - var arr; |
39 | | - |
40 | | - arr = [ 'abc', 123, null, NaN, undefined ]; |
41 | | - t.equal( isPrimitiveArray( arr ), true, 'returns true' ); |
42 | | - |
43 | | - arr = [ 5.0, '5.0', new Number( 2 ) ]; |
44 | | - t.equal( isPrimitiveArray( arr ), false, 'returns false' ); |
45 | | - |
46 | | - arr = { |
47 | | - 'length': 3, |
48 | | - '0': 5.0, |
49 | | - '1': '5.0', |
50 | | - '2': false |
51 | | - }; |
52 | | - t.equal( isPrimitiveArray( arr ), true, 'returns true' ); |
53 | | - |
54 | | - arr = new Uint8Array( [ 1, 2, 3, 4, 5 ] ); |
55 | | - t.equal( isPrimitiveArray( arr ), true, 'returns true' ); |
56 | | - |
57 | | - arr = [ {}, new String( 'abc' ) ]; |
58 | | - t.equal( isPrimitiveArray( arr ), false, 'returns false' ); |
59 | | - |
| 31 | + t.strictEqual( main !== void 0, true, 'main export is defined' ); |
60 | 32 | t.end(); |
61 | 33 | }); |
0 commit comments