|
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 isStringArray = require( './../../dist' ); |
| 24 | +var main = require( './../../dist' ); |
25 | 25 |
|
26 | 26 |
|
27 | 27 | // TESTS // |
28 | 28 |
|
29 | | -tape( 'main export is a function', function test( t ) { |
| 29 | +tape( 'main export is defined', function test( t ) { |
30 | 30 | t.ok( true, __filename ); |
31 | | - t.strictEqual( typeof isStringArray, 'function', 'main export is a function' ); |
32 | | - t.end(); |
33 | | -}); |
34 | | - |
35 | | -tape( 'the function tests for an array of `string` values', function test( t ) { |
36 | | - var arr; |
37 | | - |
38 | | - arr = [ 'a', new String( 'b' ) ]; // eslint-disable-line no-new-wrappers |
39 | | - t.equal( isStringArray( arr ), true, 'returns true' ); |
40 | | - |
41 | | - arr = [ 'a', 5, null ]; |
42 | | - t.equal( isStringArray( arr ), false, 'returns false' ); |
43 | | - |
44 | | - t.end(); |
45 | | -}); |
46 | | - |
47 | | -tape( 'the function provides a method to test for an array of `string` primitives', function test( t ) { |
48 | | - var arr; |
49 | | - |
50 | | - arr = [ 'a', 'b' ]; |
51 | | - t.equal( isStringArray.primitives( arr ), true, 'returns true' ); |
52 | | - |
53 | | - arr = [ new String( 'a' ), 'b' ]; // eslint-disable-line no-new-wrappers |
54 | | - t.equal( isStringArray.primitives( arr ), false, 'returns false' ); |
55 | | - |
56 | | - t.end(); |
57 | | -}); |
58 | | - |
59 | | -tape( 'the function provides a method to test for an array of `String` objects', function test( t ) { |
60 | | - var arr; |
61 | | - |
62 | | - arr = [ new String( 'a' ), new String( 'b' ) ]; // eslint-disable-line no-new-wrappers |
63 | | - t.equal( isStringArray.objects( arr ), true, 'returns true' ); |
64 | | - |
65 | | - arr = [ 'a', 'b' ]; |
66 | | - t.equal( isStringArray.objects( arr ), false, 'returns false' ); |
67 | | - |
| 31 | + t.strictEqual( main !== void 0, true, 'main export is defined' ); |
68 | 32 | t.end(); |
69 | 33 | }); |
0 commit comments