You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I remove the top-level await it works as expected. It seems like the tests are only collected in the sync context, but since we are explicitly calling test.run() in each file, should we expect uvu to work with top-level await and also the async context?
// same as top-level awaitimport{test}from'uvu'import*asassertfrom'uvu/assert'setTimeout(()=>{test('Math.sqrt()',()=>{assert.is(Math.sqrt(4),2)assert.is(Math.sqrt(144),12)assert.is(Math.sqrt(2),Math.SQRT2)})test.run()})
The text was updated successfully, but these errors were encountered:
antfu
changed the title
Top-level Await
Support for Top-level Await
Oct 8, 2021
If I remove the top-level await it works as expected. It seems like the tests are only collected in the sync context, but since we are explicitly calling
test.run()
in each file, should we expectuvu
to work with top-level await and also the async context?The text was updated successfully, but these errors were encountered: