-
Notifications
You must be signed in to change notification settings - Fork 672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use typescript for global hooks #6867
Comments
Thank you for your suggestion. We'll take it into account. |
This would be really handy to have. |
This issue has been automatically marked as stale because it has not had any activity for a long period. It will be closed and archived if no further activity occurs. However, we may return to this issue in the future. If it still affects you or you have any additional information regarding it, please leave a comment and we will keep it open. |
We're closing this issue after a prolonged period of inactivity. If it still affects you, please add a comment to this issue with up-to-date information. Thank you. |
What is your Scenario?
We have hook code written in typescript that we currently have to copy and paste to all our tests, it would be nice to be able to define our global fixture/test hook code once but because it's written in typescript we would have to pre-compile it in order to use it in the JavaScript config file
What are you suggesting?
Some mechanism for defining a file where you hooks can live instead of the code being directly in the config file. For example if you could specify a path to your hooks file instead of the functions directly this code could be written in typescript and compiled by testcafe
What alternatives have you considered?
Compiling the code before using it, this would be a little awkward as it would require two typescript builds one before testcafe starts and the one by testcafe.
I had the thought that we could maybe do this as a work around:
but there does not seem to be a way to find out where the TS is compiled to by testcafe or not clear if testcafe would know to compile these files at all
Additional context
No response
The text was updated successfully, but these errors were encountered: