-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
tests typescript migration #31234
tests typescript migration #31234
Conversation
Pinging @elastic/kibana-qa |
Pinging @elastic/kibana-app |
💔 Build Failed |
@vitalics I was working on something similar but it looks like you're a bit further along. I'm going to see how I can move this forward. |
💔 Build Failed |
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
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.
This is awesome! didn't check anything locally, @mattkime talked about verifying that intended failure will show up as a failure which sounds like a great plan prior to merge, but otherwise it looks good to me!
@@ -75,6 +75,7 @@ const functionalTestRunner = createFunctionalTestRunner({ | |||
bail: cmd.bail, | |||
grep: cmd.grep, | |||
invert: cmd.invert, | |||
require: `ts-node/register --project tests/tsconfig.json -r tsconfig-paths/register -T "test/**/*.{ts,js}"` |
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.
So I guess this is the key part that was missing in my PR? Any idea why this works? Do we need this ts-node
step for other packages? Just curious.
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.
Its initializing typescript parsing before loading ts files. https://github.com/TypeStrong/ts-node#mocha
Do we need this
ts-node
step for other packages? Just curious.
I suspect not since its being added at the test runner level but I'm not 100%.
* add typescript support for functional tests
…onfig files (#31948) In #31234 there were some extra changes that I've reverted, like use of the `tsconfig-paths` package to magically rewrite import statements to defy the standard node module resolution algorithm, the inclusion of several unnecessary options in the `test/tsconfig.json` file, and changes of the line-endings in the config files. This also brings a few enhancements from #30190 including a modularized version of the expect.js types, and options for explicit mappings for the PageObjects and services used in ftr tests.
…onfig files (elastic#31948) In elastic#31234 there were some extra changes that I've reverted, like use of the `tsconfig-paths` package to magically rewrite import statements to defy the standard node module resolution algorithm, the inclusion of several unnecessary options in the `test/tsconfig.json` file, and changes of the line-endings in the config files. This also brings a few enhancements from elastic#30190 including a modularized version of the expect.js types, and options for explicit mappings for the PageObjects and services used in ftr tests.
…onfig files (#31948) (#32250) In #31234 there were some extra changes that I've reverted, like use of the `tsconfig-paths` package to magically rewrite import statements to defy the standard node module resolution algorithm, the inclusion of several unnecessary options in the `test/tsconfig.json` file, and changes of the line-endings in the config files. This also brings a few enhancements from #30190 including a modularized version of the expect.js types, and options for explicit mappings for the PageObjects and services used in ftr tests.
* add typescript support for functional tests
…onfig files (elastic#31948) In elastic#31234 there were some extra changes that I've reverted, like use of the `tsconfig-paths` package to magically rewrite import statements to defy the standard node module resolution algorithm, the inclusion of several unnecessary options in the `test/tsconfig.json` file, and changes of the line-endings in the config files. This also brings a few enhancements from elastic#30190 including a modularized version of the expect.js types, and options for explicit mappings for the PageObjects and services used in ftr tests. # Conflicts: # src/functional_test_runner/lib/config/schema.js # test/common/services/es.ts # test/functional/page_objects/index.ts # test/functional/services/apps_menu.js # yarn.lock
Backporting to 7.0 in #32827 |
…onfig files (elastic#31948) In elastic#31234 there were some extra changes that I've reverted, like use of the `tsconfig-paths` package to magically rewrite import statements to defy the standard node module resolution algorithm, the inclusion of several unnecessary options in the `test/tsconfig.json` file, and changes of the line-endings in the config files. This also brings a few enhancements from elastic#30190 including a modularized version of the expect.js types, and options for explicit mappings for the PageObjects and services used in ftr tests. # Conflicts: # src/functional_test_runner/lib/config/schema.js # test/common/services/es.ts # test/functional/page_objects/index.ts # test/functional/services/apps_menu.js # yarn.lock
…32827) * [ts] add script to verify that all ts is in a project (#32727) Based on #32705 We currently have TypeScript code that was backported to 7.0, which was backported without issue because it falls outside of any TypeScript projects in 7.0. This means that the pre-commit hooks break on changes to these files, and that they are not getting type checked by the type_check script. To fix this we need to verify that every typescript file in the repository is covered by a tsconfig.json file as part of CI. * tests typescript migration (#31234) * add typescript support for functional tests * [ts][ftr] improve types for ftr and expect.js, cleanup changes to tsconfig files (#31948) In #31234 there were some extra changes that I've reverted, like use of the `tsconfig-paths` package to magically rewrite import statements to defy the standard node module resolution algorithm, the inclusion of several unnecessary options in the `test/tsconfig.json` file, and changes of the line-endings in the config files. This also brings a few enhancements from #30190 including a modularized version of the expect.js types, and options for explicit mappings for the PageObjects and services used in ftr tests. # Conflicts: # src/functional_test_runner/lib/config/schema.js # test/common/services/es.ts # test/functional/page_objects/index.ts # test/functional/services/apps_menu.js # yarn.lock
Summary
Add typescript support for functional tests.
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers