Closed
Description
openedon Sep 28, 2017
it('should run async code', function() {
(async function main() {
let upload = await Upload.findOne({
uploadUrl: {$exists: true},
visibility: 'public'
}).populate('checkedViews uploader').exec();
console.log(upload);
upload.should.be.an('object');
})();
});
Otherwise I get
Error: timeout of 2000ms exceeded. Ensure the done() callback is being called in this test.
If I try and change the it function to an async function. How can I use async/await?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels