elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.6k stars 8.21k forks source link

[docs-utils/api_docs] failing test with TS upgrade #120125

Open spalger opened 2 years ago

spalger commented 2 years ago

Upgrading TS caused snapshots in packages/kbn-docs-utils/src/api_docs/build_api_declarations/buid_api_declaration.test.ts to break, and it was identified that a fix was necessary but not urgent so the test was skipped in https://github.com/elastic/kibana/pull/104470 and needs to be fixed once it's merged.

Failure: https://buildkite.com/organizations/elastic/pipelines/kibana-pull-request/builds/10224/jobs/2de53b69-4e1c-4ab4-a50e-2410f3f98c64/artifacts/0f1d1239-1744-4c36-8fa8-c17f90cbc714

Error: expect(received).toBe(expected) // Object.is equality

Expected: ">"
Received: ", string | React.JSXElementConstructor<any>>"
elasticmachine commented 2 years ago

Pinging @elastic/kibana-operations (Team:Operations)

spalger commented 2 years ago

@stacey-gammon FYI, these two tests were updated with similar snapshots by other people working on that PR, when we fix this it will probably fix those automatically, but just so you're aware and keep an eye out:

https://github.com/tylersmalley/kibana/blob/ts-4-3-4/packages/kbn-docs-utils/src/api_docs/tests/api_doc_suite.test.ts#L333 https://github.com/tylersmalley/kibana/blob/ts-4-3-4/packages/kbn-docs-utils/src/api_docs/tests/snapshots/plugin_a.json#L1244

tylersmalley commented 2 years ago

@stacey-gammon is this still an issue?

stacey-gammon commented 2 years ago

Yup! I'll unassign myself for now, obviously I did not find time to fix this 😬 .

https://github.com/elastic/kibana/blob/main/packages/kbn-docs-utils/src/api_docs/build_api_declarations/buid_api_declaration.test.ts#L118