@@ -1204,29 +1204,30 @@ describe('Parse.User testing', () => {
1204
1204
strictEqual ( provider . authData . expiration_date , provider . synchronizedExpiration ) ;
1205
1205
ok ( model . _isLinked ( "facebook" ) , "User should be linked to facebook" ) ;
1206
1206
1207
- Parse . User . logOut ( ) ;
1208
- ok ( provider . loggedOut ) ;
1209
- provider . loggedOut = false ;
1210
-
1211
- Parse . User . _logInWith ( "facebook" , {
1212
- success : function ( innerModel ) {
1213
- ok ( innerModel instanceof Parse . User ,
1214
- "Model should be a Parse.User" ) ;
1215
- ok ( innerModel === Parse . User . current ( ) ,
1216
- "Returned model should be the current user" ) ;
1217
- ok ( provider . authData . id === provider . synchronizedUserId ) ;
1218
- ok ( provider . authData . access_token === provider . synchronizedAuthToken ) ;
1219
- ok ( innerModel . _isLinked ( "facebook" ) ,
1220
- "User should be linked to facebook" ) ;
1221
- ok ( innerModel . existed ( ) , "User should not be newly-created" ) ;
1222
- done ( ) ;
1223
- } ,
1224
- error : function ( model , error ) {
1225
- jfail ( error ) ;
1226
- ok ( false , "LogIn should have worked" ) ;
1227
- done ( ) ;
1228
- }
1229
- } ) ;
1207
+ Parse . User . logOut ( ) . then ( ( ) => {
1208
+ ok ( provider . loggedOut ) ;
1209
+ provider . loggedOut = false ;
1210
+
1211
+ Parse . User . _logInWith ( "facebook" , {
1212
+ success : function ( innerModel ) {
1213
+ ok ( innerModel instanceof Parse . User ,
1214
+ "Model should be a Parse.User" ) ;
1215
+ ok ( innerModel === Parse . User . current ( ) ,
1216
+ "Returned model should be the current user" ) ;
1217
+ ok ( provider . authData . id === provider . synchronizedUserId ) ;
1218
+ ok ( provider . authData . access_token === provider . synchronizedAuthToken ) ;
1219
+ ok ( innerModel . _isLinked ( "facebook" ) ,
1220
+ "User should be linked to facebook" ) ;
1221
+ ok ( innerModel . existed ( ) , "User should not be newly-created" ) ;
1222
+ done ( ) ;
1223
+ } ,
1224
+ error : function ( model , error ) {
1225
+ jfail ( error ) ;
1226
+ ok ( false , "LogIn should have worked" ) ;
1227
+ done ( ) ;
1228
+ }
1229
+ } ) ;
1230
+ } , done . fail ) ;
1230
1231
} ,
1231
1232
error : function ( model , error ) {
1232
1233
jfail ( error ) ;
0 commit comments