-
Notifications
You must be signed in to change notification settings - Fork 675
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
feat: added typescript testcaferc configuration file support #8039
Conversation
is there any progress here? We could really use this feature and everything in this PR seem Green and Approved. |
@lukas-zech-software |
So excited for this! |
This pull request 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 pull request in the future. If it is still relevant or you have any additional information regarding it, please leave a comment and we will keep it open. |
We're closing this pull request after a prolonged period of inactivity. If it is still relevant, please ask for this pull request to be reopened. Thank you. |
Purpose
Describe the problem you want to address or the feature you want to implement.
Added support for TypeScript configuration file (testcaferc.ts) so TS code can be referenced in global hooks and similar functionality. However, defining options for testcaferc.ts compilation itself is only possible from CLI. We can define them using
--compiler-options
. If no options are provided in CLI we use default compiler with default compilation options.Approach
Describe how your changes address the issue or implement the desired functionality in as much detail as possible.
Added new methods in \src\configuration\testcafe-configuration.ts: _readTsConfigurationFileContent, _isTSConfiguration and _readConfigurationOptions.
Added new method in \src\compiler\test-file\formats\typescript\compiler.ts: compileConfiguration.
Inside testcafe-configuration.ts If config file is a ts config, then call _readTsConfigurationFileContent.
Also in \src\index.js pass compilerOptions to configuration.init().
Wrote tests for testing the above mentioned functionality inside \test\server\configuration-test.js
Provide a link to the existing issue(s), if any.
closes #7373
Pre-Merge TODO