Skip to content

Conversation

jeremyruppel
Copy link
Member

Unsatisfied with other solutions out there, I worked with AI to come up with a super comprehensive testing library for typescript. Check the README for usage details.

This also introduces type tests for many of the interfaces exported from flickr-sdk.

This also also makes it so MockTransport can accept any type of thing to return, not just string.

@jeremyruppel jeremyruppel requested a review from Copilot July 18, 2025 15:45
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces flinch, a comprehensive TypeScript compile-time testing library, and integrates type testing throughout the flickr-sdk codebase. The PR also improves type safety by converting JSDoc comments to TypeScript types and making MockTransport more flexible.

  • Introduces a new package @flickr/flinch for compile-time TypeScript type testing
  • Adds comprehensive type tests for flickr-sdk interfaces and types using the new testing library
  • Converts JSDoc type annotations to proper TypeScript types across test files

Reviewed Changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/flinch/ Complete implementation of the flinch type testing library with utilities, tests, and documentation
test/types.ts New comprehensive type tests for flickr-sdk interfaces using flinch
tsconfig.test.json TypeScript configuration for running type tests
src/transport/mock.ts Updates MockTransport to accept any type instead of just strings
src/index.ts Exports additional types and configurations for better type testing
test/*.ts Converts JSDoc type annotations to proper TypeScript types
package.json Adds workspace configuration and updates test script
Comments suppressed due to low confidence (1)

test/transport.fetch.ts:114

  • Using any type reduces type safety. Consider using a more specific type like Promise<[IncomingMessage, ServerResponse]> since once(server, 'request') returns a promise that resolves with request and response objects.
      const promise: Promise<any> = once(server, "request")

@jeremyruppel jeremyruppel merged commit 1f99286 into main Jul 18, 2025
6 checks passed
@jeremyruppel jeremyruppel deleted the flinch branch July 18, 2025 23:28
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.

1 participant