Properly handle promises in test
diff --git a/spec/projectApi.spec.js b/spec/projectApi.spec.js
index cedece4..1144a22 100644
--- a/spec/projectApi.spec.js
+++ b/spec/projectApi.spec.js
@@ -37,7 +37,7 @@
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');
@@ -45,15 +45,7 @@
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() {