NoMongo: adding a CreateMockContext Factory function for unit testing #3292
Labels
feature request
no-issue-activity
No issue activity
refactor
Refactor the code to improve its quality
test
Testing application
unapproved
Unapproved for Pull Request
Is your feature request related to a problem? Please describe.
Current unit tests have multiple individually defined mock GraphQL contexts, which leads to inconsistencies, duplicated code, and increased maintenance overhead.
Describe the solution you'd like
Develop a centralized
createMockContext
factory function to generate consistent mock contexts. This factory will streamline test setups and provide a unified method to override defaults when needed.Describe alternatives you've considered
Approach to be followed (optional)
mockContextFactory.ts
containing thecreateMockContext
function.Additional context
Implementing this factory will enhance test reliability, reduce duplication, and improve overall code readability by centralizing mock context creation.
Potential internship candidates
Please read this if you are planning to apply for a Palisadoes Foundation internship
The text was updated successfully, but these errors were encountered: