Skip to content
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

[BUG] Export types for /lib/test #583

Closed
ashwin-pc opened this issue Mar 9, 2023 · 4 comments
Closed

[BUG] Export types for /lib/test #583

ashwin-pc opened this issue Mar 9, 2023 · 4 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@ashwin-pc
Copy link
Member

Describe the bug

In OpenSearch Dashboards we use exported test functions such as findTestSubject from oui. These however throw type errors because the type is not exposed similar to the components.

To Reproduce
Steps to reproduce the behavior:

  1. Go to OpenSearch Dashboards repository
  2. open the file src/plugins/dashboard/public/application/dashboard_empty_screen.test.tsx
  3. see typescript error

Expected behavior
Expose the types for the test functions too

OpenSearch Version
3.0
Dashboards Version
3.0
Plugins

Please list all plugins currently enabled.

Screenshots

If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Browser and version [e.g. 22]

Additional context

Add any other context about the problem here.

@ashwin-pc ashwin-pc added the bug Something isn't working label Mar 9, 2023
@Nicksqain
Copy link

Nicksqain commented Mar 10, 2023

Is it necessary to fix the types? After all, you can update the source of the import, since a new module is declared, the reference should be
import { findTestSubject } from '@opensearch-project/oui/lib/test/find_test_subject';

@ashwin-pc
Copy link
Member Author

Honestly it might just be as simple as exporting the function type thats already declared here: https://github.com/opensearch-project/oui/blob/main/src/test/find_test_subject.ts#L52-L56. But i havent looked into it yet. Thats why i'm simply calling out the symptom.

@abbyhu2000 abbyhu2000 added good first issue Good for newcomers CCI College Contributor Initiative and removed CCI College Contributor Initiative labels Apr 11, 2023
@joshuarrrr
Copy link
Member

I have some recollection that this has been fixed...

@joshuarrrr
Copy link
Member

Fixed via opensearch-project/OpenSearch-Dashboards#3798, I believe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants