Fix mimeType inconsistency in Resources 3.3 solution test #22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixed a mimeType inconsistency in the Resources exercise 3.3 solution where the test expected
application/json
but the implementation should returntext/plain
to align with the README example pattern.Issue
The solution test was failing because:
mimeType: 'application/json'
mimeType: 'text/plain'
(following README example)This was causing test failures with output like:
Solution
Updated both the implementation and test to consistently use
text/plain
:resources.ts
: Changed tag resource listing mimeType to follow the README example patternindex.test.ts
: Updated test expectation to match the implementationThe README example demonstrates using
text/plain
for resource listings:This change ensures consistency between the documented example, implementation, and test expectations while maintaining the educational objective of following the provided patterns.
Note
The entries test issue mentioned in the original issue appears to be from running the problem test rather than the solution test. The solution test correctly expects no entries in the resource list since entries have
list: undefined
by design.Fixes #21
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.