Skip to content

Commit d55aeea

Browse files
committed
Add tests for additional bundles
1 parent cc635dd commit d55aeea

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

test/test.dist.js

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,69 @@ tape( 'project contains a distributable file containing datasets (minified)', fu
4848
t.end();
4949
});
5050

51+
tape( 'project contains a distributable file containing non-excluded datasets (minified)', function test( t ) {
52+
// eslint-disable-next-line stdlib/no-dynamic-require
53+
var bundle = require( join( dirpath, 'stdlib-datasets-tree-exclude.min.js' ) );
54+
t.equal( typeof bundle, 'object', 'main export is an object' );
55+
t.equal( typeof bundle.datasets.AFINN_111, 'function', 'is a function' );
56+
t.equal( typeof bundle.datasets.AFINN_111(), 'object', 'returns expected value' ); // eslint-disable-line new-cap
57+
t.end();
58+
});
59+
60+
tape( 'project contains a distributable file containing the CMU pronouncing dictionary (minified)', function test( t ) {
61+
// eslint-disable-next-line stdlib/no-dynamic-require
62+
var bundle = require( join( dirpath, 'stdlib-datasets-cmudict.min.js' ) );
63+
t.equal( typeof bundle, 'object', 'main export is an object' );
64+
t.equal( typeof bundle.CMUDICT, 'function', 'is a function' );
65+
t.equal( typeof bundle.CMUDICT(), 'object', 'returns expected value' ); // eslint-disable-line new-cap
66+
t.end();
67+
});
68+
69+
tape( 'project contains a distributable file containing images (minified)', function test( t ) {
70+
// eslint-disable-next-line stdlib/no-dynamic-require
71+
var bundle = require( join( dirpath, 'stdlib-datasets-img.min.js' ) );
72+
t.equal( typeof bundle, 'object', 'main export is an object' );
73+
t.equal( typeof bundle.IMG_ACANTHUS_MOLLIS, 'function', 'is a function' );
74+
t.equal( typeof bundle.IMG_ACANTHUS_MOLLIS(), 'object', 'returns expected value' ); // eslint-disable-line new-cap
75+
t.end();
76+
});
77+
78+
tape( 'project contains a distributable file containing Moby Dick (minified)', function test( t ) {
79+
// eslint-disable-next-line stdlib/no-dynamic-require
80+
var bundle = require( join( dirpath, 'stdlib-datasets-moby-dick.min.js' ) );
81+
t.equal( typeof bundle, 'object', 'main export is an object' );
82+
t.equal( typeof bundle.MOBY_DICK, 'function', 'is a function' );
83+
t.equal( typeof bundle.MOBY_DICK(), 'object', 'returns expected value' ); // eslint-disable-line new-cap
84+
t.end();
85+
});
86+
87+
tape( 'project contains a distributable file containing SOTU (minified)', function test( t ) {
88+
// eslint-disable-next-line stdlib/no-dynamic-require
89+
var bundle = require( join( dirpath, 'stdlib-datasets-sotu.min.js' ) );
90+
t.equal( typeof bundle, 'object', 'main export is an object' );
91+
t.equal( typeof bundle.SOTU, 'function', 'is a function' );
92+
t.equal( typeof bundle.SOTU(), 'object', 'returns expected value' ); // eslint-disable-line new-cap
93+
t.end();
94+
});
95+
96+
tape( 'project contains a distributable file containing Spam Assassin (minified)', function test( t ) {
97+
// eslint-disable-next-line stdlib/no-dynamic-require
98+
var bundle = require( join( dirpath, 'stdlib-datasets-spam-assassin.min.js' ) );
99+
t.equal( typeof bundle, 'object', 'main export is an object' );
100+
t.equal( typeof bundle.SPAM_ASSASSIN, 'function', 'is a function' );
101+
t.equal( typeof bundle.SPAM_ASSASSIN(), 'object', 'returns expected value' ); // eslint-disable-line new-cap
102+
t.end();
103+
});
104+
105+
tape( 'project contains a distributable file containing Suthaharan\'s single-hop sensor network data (minified)', function test( t ) {
106+
// eslint-disable-next-line stdlib/no-dynamic-require
107+
var bundle = require( join( dirpath, 'stdlib-datasets-suthaharan-single-hop-sensor-network.min.js' ) );
108+
t.equal( typeof bundle, 'object', 'main export is an object' );
109+
t.equal( typeof bundle.SUTHAHARAN_SINGLE_HOP_SENSOR_NETWORK, 'function', 'is a function' );
110+
t.equal( typeof bundle.SUTHAHARAN_SINGLE_HOP_SENSOR_NETWORK(), 'object', 'returns expected value' ); // eslint-disable-line new-cap
111+
t.end();
112+
});
113+
51114
tape( 'project contains a distributable file exposing a "flat" namespace (unminified)', function test( t ) {
52115
// eslint-disable-next-line stdlib/no-dynamic-require
53116
var bundle = require( join( dirpath, 'stdlib-flat.js' ) );

0 commit comments

Comments
 (0)