-
Notifications
You must be signed in to change notification settings - Fork 114
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
Expose TestModuleConfig interface #2113
Comments
I realize now that I could get the config setting in this manner: let testModuleConfig: NonNullable<Parameters<typeof testkit.testModule>['1']>; ...but that can quickly become burdensome as the number of tests increase. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
In tests, I may want to define a variable of type
TestModuleConfig
scoped for the entire test suite. It is not possible to get compile errors at the declaration site becauseTestModuleConfig
is not exposed. Further, if I want to modify that object later, I won't receive compile time errors at that line of code.Describe the solution you'd like
Export this type to users of
graphql-modules
graphql-modules/packages/graphql-modules/src/testing/test-module.ts
Lines 29 to 38 in 75552e6
Describe alternatives you've considered
Copy/pasta of the type into a project or each test file is not ideal, especially if the type changes on this project.
Additional context
If the type is exposed, users would be able to do this.
Perhaps there are other types worth exporting as well, but this is one I've come across thus far.
The text was updated successfully, but these errors were encountered: