testcafe
testcafe copied to clipboard
feat: added typescript testcaferc configuration file support
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 https://github.com/DevExpress/testcafe/issues/7373
Pre-Merge TODO
- [x] Write tests for your proposed changes
- [x] Make sure that existing tests do not fail
is there any progress here?
We could really use this feature and everything in this PR seem Green and Approved. Anything missing?
@lukas-zech-software We are not merging this PR since we think this feature still needs improvement. I cannot give you an ETA at this time since my predictions may not be accurate.
So excited for this!