|
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. |
|
18 | 18 |
|
19 | 19 | 'use strict'; |
20 | 20 |
|
21 | | -/* eslint-disable no-new-wrappers */ |
22 | | - |
23 | 21 | // MODULES // |
24 | 22 |
|
25 | 23 | var tape = require( 'tape' ); |
26 | | -var Boolean = require( '@stdlib/boolean-ctor' ); |
27 | | -var isBooleanArray = require( './../../dist' ); |
| 24 | +var main = require( './../../dist' ); |
28 | 25 |
|
29 | 26 |
|
30 | 27 | // TESTS // |
31 | 28 |
|
32 | | -tape( 'main export is a function', function test( t ) { |
| 29 | +tape( 'main export is defined', function test( t ) { |
33 | 30 | t.ok( true, __filename ); |
34 | | - t.strictEqual( typeof isBooleanArray, 'function', 'main export is a function' ); |
35 | | - t.end(); |
36 | | -}); |
37 | | - |
38 | | -tape( 'the function tests for an array-like object containing only booleans', function test( t ) { |
39 | | - var arr; |
40 | | - |
41 | | - arr = [ true, new Boolean( true ), false, new Boolean( false ) ]; |
42 | | - t.equal( isBooleanArray( arr ), true, 'returns true' ); |
43 | | - |
44 | | - arr = { |
45 | | - 'length': 2, |
46 | | - '0': true, |
47 | | - '1': false |
48 | | - }; |
49 | | - t.equal( isBooleanArray( arr ), true, 'returns true' ); |
50 | | - |
51 | | - arr = [ true, 'true', null ]; |
52 | | - t.equal( isBooleanArray( arr ), false, 'returns false' ); |
53 | | - |
54 | | - t.end(); |
55 | | -}); |
56 | | - |
57 | | -tape( 'the function provides a method to test for an array-like object containing only boolean primitives', function test( t ) { |
58 | | - var arr; |
59 | | - |
60 | | - arr = [ true, false, true, false ]; |
61 | | - t.equal( isBooleanArray.primitives( arr ), true, 'returns true' ); |
62 | | - |
63 | | - arr = { |
64 | | - 'length': 2, |
65 | | - '0': false, |
66 | | - '1': true |
67 | | - }; |
68 | | - t.equal( isBooleanArray.primitives( arr ), true, 'returns true' ); |
69 | | - |
70 | | - arr = [ new Boolean( true ), false, false ]; |
71 | | - t.equal( isBooleanArray.primitives( arr ), false, 'returns false' ); |
72 | | - |
73 | | - t.end(); |
74 | | -}); |
75 | | - |
76 | | -tape( 'the function provides a method to test for an array-like object containing only `Boolean` objects', function test( t ) { |
77 | | - var arr; |
78 | | - |
79 | | - arr = [ new Boolean( true ), new Boolean( false ), new Boolean( true ) ]; |
80 | | - t.equal( isBooleanArray.objects( arr ), true, 'returns true' ); |
81 | | - |
82 | | - arr = { |
83 | | - 'length': 2, |
84 | | - '0': new Boolean( true ), |
85 | | - '1': new Boolean( true ) |
86 | | - }; |
87 | | - t.equal( isBooleanArray.objects( arr ), true, 'returns true' ); |
88 | | - |
89 | | - arr = [ new Boolean( true ), false, false ]; |
90 | | - t.equal( isBooleanArray.objects( arr ), false, 'returns false' ); |
91 | | - |
| 31 | + t.strictEqual( main !== void 0, true, 'main export is defined' ); |
92 | 32 | t.end(); |
93 | 33 | }); |
0 commit comments