-
Notifications
You must be signed in to change notification settings - Fork 673
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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! |
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