You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unit tests fail to properly cover the logic of actual GraphQL resolvers in the specified file.
The tests utilize a _resolverContext_ instead of the correct GraphqlContext defined in context.ts for mockContextType .
Steps to Reproduce
Navigate to the designated test file.
Execute the unit tests, observing that all tests pass.
Notice the lack of effective code coverage in the original resolver file.
Try making any changes in original resolver ,tests still passes due to obvious reasons.
Expected Behavior
Unit tests should directly test the logic of the actual GraphQL resolvers, ensuring comprehensive code coverage instead of making a dummy resolver and testing that.
Any deviations from the original resolver logic should trigger test failures.
The GraphqlContext type, as specified in context.ts, should be consistently used for resolver contexts in tests, not a mock or simplified version.
Actual Behavior
The test file replicates resolver logic instead of directly testing the original resolvers, resulting in ineffective coverage.
The resolver context type used in tests (_testContext_) does not match the GraphqlContext used in the application.
Changes made to the original resolver logic do not cause the tests to fail, indicating a lack of proper testing.
Screenshots
Image 1: Demonstration of tests passing despite harmful changes to the actual resolver.
Image 2: Screenshot showing test passing.
Image3 : No coverage
Potential internship candidates
Please read this if you are planning to apply for a Palisadoes Foundation internship
Bug Description
_resolverContext_
instead of the correctGraphqlContext
defined incontext.ts
for mockContextType .Steps to Reproduce
Expected Behavior
GraphqlContext
type, as specified incontext.ts
, should be consistently used for resolver contexts in tests, not a mock or simplified version.Actual Behavior
_testContext_
) does not match theGraphqlContext
used in the application.Screenshots
Image 1: Demonstration of tests passing despite harmful changes to the actual resolver.
Image 2: Screenshot showing test passing.

Image3 : No coverage

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: