Closed karlhepler closed 3 years ago
there is async behaviour in the copy of file and in the opening of the browser. The solution is not to eliminate the await. I am reevaluating that code and may change to be more compliant.
On Thu, Jun 24, 2021 at 12:13 PM Karl Hepler @.***> wrote:
60 https://github.com/rpii/wdio-html-reporter/pull/60
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rpii/wdio-html-reporter/issues/59#issuecomment-867887216, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEABIEPNHWP62YYPEN2ZLO3TUN7RXANCNFSM47IO3CGQ .
OK. Thanks. I'll close my PR.
https://github.com/rpii/wdio-html-reporter/blob/03b44d4e1f7061755cac32765dc1a535a7f5876d/src/reportAggregator.ts#L74
I can't figure out why the
createReport
method is async. There is nothing in there that usesawait
that I can see. There are no promises that I can see. Everything looks synchronous.Also, the way it's being used the
onComplete
example doesn't seem quite right to me. It looks like it's going to trigger a race condition.I think it should be probably just be a normal synchronous method. Doing that would also fix the potential
onComplete
issue.Please let me know if I just missed something - I just can't figure out why this needs to be async.