Skip to content

test: add regression tests for CSV query serialization (#28) - #30

Closed
aditya226-sharma wants to merge 1 commit into
Api-Wrappers:mainfrom
aditya226-sharma:test/csv-query-serialization
Closed

test: add regression tests for CSV query serialization (#28)#30
aditya226-sharma wants to merge 1 commit into
Api-Wrappers:mainfrom
aditya226-sharma:test/csv-query-serialization

Conversation

@aditya226-sharma

Copy link
Copy Markdown

Summary

Adds regression tests for array/comma-separated query option serialization in endpoint methods.

Changes

  • Added new test block "serializes array options as comma-separated query values"
  • Tests movies.images with include_image_language: ["en", "null"] → serialized as en,null
  • Tests movies.details with append_to_response: ["credits", "videos", "images"] → serialized as credits,videos,images
  • Tests tvShows.images with include_image_language: ["en"] → serialized as en
  • Uses the existing mocked request capture pattern (no live TMDB requests)

Why

Array and comma-separated query options are a common source of serialization bugs. These tests establish regression coverage for the csv() utility's integration with endpoint methods.

Closes #28

@TDanks2000

Copy link
Copy Markdown
Collaborator

Looks good overall, but there’s one issue in the movies.details test.

movies.details() expects the append-to-response values as the second argument directly, so this:

tmdb.movies.details(550, {
	append_to_response: ["credits", "videos", "images"],
})

should be:

tmdb.movies.details(550, ["credits", "videos", "images"])

The current version doesn’t match the method signature and should fail typechecking/runtime.

Once that’s fixed and bun run test + bun run typecheck pass, this should be good to merge.

@TDanks2000 TDanks2000 closed this Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add regression tests for query serialization options

2 participants