chore: fix flaky test (#3928)

* logOut is async so handle with a promise
This commit is contained in:
Florent Vilmart
2017-06-13 23:54:15 -04:00
committed by GitHub
parent 8b21d5ab80
commit 9256b2d7e6

View File

@@ -1204,7 +1204,7 @@ describe('Parse.User testing', () => {
strictEqual(provider.authData.expiration_date, provider.synchronizedExpiration); strictEqual(provider.authData.expiration_date, provider.synchronizedExpiration);
ok(model._isLinked("facebook"), "User should be linked to facebook"); ok(model._isLinked("facebook"), "User should be linked to facebook");
Parse.User.logOut(); Parse.User.logOut().then(() => {
ok(provider.loggedOut); ok(provider.loggedOut);
provider.loggedOut = false; provider.loggedOut = false;
@@ -1227,6 +1227,7 @@ describe('Parse.User testing', () => {
done(); done();
} }
}); });
}, done.fail);
}, },
error: function(model, error) { error: function(model, error) {
jfail(error); jfail(error);