Created
August 28, 2014 15:06
-
-
Save Azeirah/e14ca60b891b54639279 to your computer and use it in GitHub Desktop.
Failing async tests at creating two accounts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tinytest.addAsync('test', function (test, done) { | |
if (Meteor.isClient) { | |
Accounts.createUser({ | |
username: 'user1', | |
password: 'fruit' | |
}, function (err) { | |
Accounts.logout(function () { | |
Accounts.createUser({ | |
username: 'user2', | |
password: 'fruit' | |
}, function (err) {if (err) console.log(err);}); | |
}); | |
}); | |
} | |
Meteor.setTimeout(function () { | |
test.isUndefined(Meteor.users.findOne({username: 'user1'})); | |
test.isUndefined(Meteor.users.findOne({username: 'user2'})); | |
done(); | |
}, 2000); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment