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
First of all, Thank you very much for the amazing package ❤️!
Context
I want to run a global setup script before starting tests.
My actual use case is starting playwright browser server and making a ws connection on each test suite to open a tab.
What I did
I have a typescript file that does some setup tasks in scripts/test-setup.ts and I have the following command to
run tests "test": "uvu -r ts-node/register -r scripts/test-setup tests"
What happened
uvu starts running suits before the setup script finishes
This type of setup file needs top-level await in order for it to finish executing before the file "exits". Unfortunately, TLA is only available within ESM files and any --require/-r usage expects a CommonJS file.
So, in order to achieve this, this type of feature requires either #113 or #81.
Both of these will solve this through separate avenues. Closing this in favor of them.
Thanks!
First of all, Thank you very much for the amazing package ❤️!
Context
I want to run a global setup script before starting tests.
My actual use case is starting
playwright browser server
and making aws
connection on each test suite to open a tab.What I did
I have a typescript file that does some setup tasks in
scripts/test-setup.ts
and I have the following command torun tests
"test": "uvu -r ts-node/register -r scripts/test-setup tests"
What happened
uvu
starts running suits before thesetup
script finishesExpectation
Run tests after the global setup script exits
Here is a small repo to reproduce the issue https://github.com/m3hari/uvu-issue-sandbox
The text was updated successfully, but these errors were encountered: