|
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 isAlphagram = 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 isAlphagram, 'function', 'main export is a function' ); |
32 | | - t.end(); |
33 | | -}); |
34 | | - |
35 | | -tape( 'the function returns `true` if provided an alphagram', function test( t ) { |
36 | | - t.strictEqual( isAlphagram( 'abcdef' ), true, 'returns true' ); |
37 | | - t.strictEqual( isAlphagram( new String( 'beep' ) ), true, 'returns true' ); |
38 | | - t.end(); |
39 | | -}); |
40 | | - |
41 | | -tape( 'the function returns `false` if not provided an alphagram', function test( t ) { |
42 | | - var values; |
43 | | - var i; |
44 | | - |
45 | | - values = [ |
46 | | - 'zba', |
47 | | - 'akjdfa', |
48 | | - ' abc ', |
49 | | - '', |
50 | | - 5, |
51 | | - null, |
52 | | - NaN, |
53 | | - void 0, |
54 | | - true, |
55 | | - [], |
56 | | - {}, |
57 | | - function noop() {} |
58 | | - ]; |
59 | | - |
60 | | - for ( i = 0; i < values.length; i++ ) { |
61 | | - t.strictEqual( isAlphagram( values[i] ), false, 'returns false when provided ' + values[i] ); |
62 | | - } |
| 31 | + t.strictEqual( main !== void 0, true, 'main export is defined' ); |
63 | 32 | t.end(); |
64 | 33 | }); |
0 commit comments