-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Ability to disable support for using TypeScript in Version 1.6 #2677
Comments
Note: when I replace '.ts' but '.js', our custom command would not load (due to the code from #2627) so I've switch to '._ts' as we don't have any extension like this. |
hey @franklychilled, i have tried having a ts and js file with same name in my custom commands and this function |
Hi @Dharin-shah, I've change this line to Our issue is not only about custom commands, we have custom assertions and test in Typescript. We are also using @types/nightwatch@0.9.12 to provide type definition on our test. Here an example our our Login page test in Typescript
Due to our import statement on top our typescript files, we have errors like
|
@franklychilled Interesting, so if i get this correctly, you dont want any .ts files (commands, assertions, tests..) to be loaded in nightwatch since you already generate the js files yourself. Please correct me if I am wrong :) |
@Dharin-shah, You are correct, we are compiling all our .ts files using |
Is your feature request related to a problem? Please describe.
Our test suites are written in Typescript since 2018 and we are not able to upgrade from version 1.5.1 to 1.6.3. We are using type definition and base classes.
Describe the solution you'd like
Addition attribute available in nightwatch.json
Describe how the solution will work
Stop loading any *.ts files anywhere.
Describe alternatives you've considered
Ignore .ts files if a .js file exists anywhere (Custom Assertions, tests, etc...)
Additional context
We have are maintaining 2 larges test suites and we would appreciate a solution which doesn't requires a complete rewrite of our test suite.
Linked to:
1.6.0 - Added #2559 – support for using TypeScript (.ts) for test files
1.6.3 - Fixed #2627 - an issue with custom commands written in Typescript
Interim solution is to tweak the latest source code with
The text was updated successfully, but these errors were encountered: