Fix some stuff

This commit is contained in:
Drew Gross
2016-06-13 12:57:20 -07:00
parent f796d69d19
commit a69a88f3a4
9 changed files with 86 additions and 62 deletions

View File

@@ -140,6 +140,12 @@ beforeEach(done => {
});
afterEach(function(done) {
let afterLogOut = () => {
if (Object.keys(openConnections).length > 0) {
fail('There were open connections to the server left after the test finished');
}
done();
};
Parse.Cloud._removeAllHooks();
databaseAdapter.getAllClasses()
.then(allSchemas => {
@@ -157,16 +163,7 @@ afterEach(function(done) {
});
})
.then(() => Parse.User.logOut())
.then(() => {
if (Object.keys(openConnections).length > 0) {
fail('There were open connections to the server left after the test finished');
}
done();
})
.catch(error => {
fail(JSON.stringify(error));
done();
});
.then(afterLogOut, afterLogOut)
});
var TestObject = Parse.Object.extend({