UNPKG

780 BJavaScriptView Raw
1var assert = require( 'assert' );
2
3describe( 'APIClient', function() {
4
5 describe( '#indexOf()', function() {
6
7 var APIClient,
8 instance;
9
10 it( 'should load as a function', function() {
11 APIClient = require( '..' );
12 assert.equal( typeof APIClient, 'function' );
13 } );
14
15 it( 'should export a generateReportTool function', function() {
16 assert.equal( typeof APIClient.generateReportTool, 'function' );
17 } );
18
19 it( 'should return an instance when called', function() {
20 var apiUrl = 'http://localhost';
21 APIClient.setApiUrlToken( apiUrl, 'token' );
22 instance = APIClient( apiUrl );
23 assert.notEqual( instance, 'null' );
24 } );
25
26 } );
27
28} );