Skip to content

Commit

Permalink
[skyapi] refs fibercrypto#12 - Refactor API class instantiation
Browse files Browse the repository at this point in the history
  • Loading branch information
stdevCbermudez committed Apr 17, 2019
1 parent 7364f04 commit b85c77b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/node/test/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ const config = require('../../config');
let nodeClient = require('libsky-node');
var expect = require('chai').expect;

const instantiateAPI = function (path) {
return new nodeClient.DefaultApi(path);
};

const checkVersion = function (path) {
context(`Getting version from ${path}.`, function() {
it('Should return version object', function() {
let api = new nodeClient.DefaultApi(path);
let api = instantiateAPI(path);
return api.version().then(result => {
expect(result).to.be.a('object');
expect(result).to.have.property('body');
Expand Down

0 comments on commit b85c77b

Please sign in to comment.