Skip to content
Permalink
Browse files
Properly handle promises in test
  • Loading branch information
raphinesse committed Sep 6, 2018
1 parent fc0a8ab commit cddc8dc2941a490e5985f0161b83f11d0ac47a7b
Showing 1 changed file with 2 additions and 10 deletions.
@@ -37,23 +37,15 @@ describe('can get the Api', function() {
expect(Api).toBeDefined();
});

it('should export static createPlatform function', function(done) {
it('should export static createPlatform function', function() {
expect(Api.createPlatform).toBeDefined();
expect(typeof Api.createPlatform).toBe('function');

// TODO: make this do something real
var promise = Api.createPlatform(tmpDir);
expect(promise).toBeDefined();
expect(promise.then).toBeDefined();
promise.then(function(res) {
console.log('result = ' + res);
console.log("spec-success");
done();
},
function(err) {
console.log("spec-error " + err);
done();
});
return promise;
});

it('should export static updatePlatform function', function() {

0 comments on commit cddc8dc

Please sign in to comment.