Fix async problem in test cases

This commit is contained in:
Kazuhito Yokoi
2018-07-13 17:34:04 +09:00
parent 513579a7ee
commit 761161a8e5
3 changed files with 30 additions and 22 deletions

View File

@@ -31,15 +31,19 @@ describe('change Node', function() {
}
}
});
Context.load();
helper.startServer(done);
Context.load().then(function () {
helper.startServer(done);
});
});
afterEach(function(done) {
helper.unload();
helper.stopServer(done);
Context.clean({allNodes:{}});
Context.close();
helper.unload().then(function () {
return Context.clean({allNodes: {}});
}).then(function () {
return Context.close();
}).then(function () {
helper.stopServer(done);
});
});
it('should load node with defaults', function(done) {