Skip to content

import(..) returns undefinded instead of results of resolution #155

Answered by pkosiec
gerwinbrunner asked this question in Q&A
Discussion options

You must be logged in to vote

@gerwinbrunner Yup, the workaround looks like it is the best approach here. I would only slightly modify the two ending lines for the function:

await mongoSeeder.import(collections);
return true;

It seems right to me - because this is specific requirement from Cypress. And as I wrote before, resolving promise with undefined is just as fine as returning from function with undefined.

Do you feel convinced that this is not the issue of Mongo Seeding? 😄 If so, can we close this issue and PR?

Replies: 8 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by pkosiec
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #106 on March 21, 2021 18:41.