Skip to content

chore(test): Add Integration compatibility test#3391

Merged
RobinTail merged 2 commits into
masterfrom
int-compatibility-test
May 12, 2026
Merged

chore(test): Add Integration compatibility test#3391
RobinTail merged 2 commits into
masterfrom
int-compatibility-test

Conversation

@RobinTail
Copy link
Copy Markdown
Owner

@RobinTail RobinTail commented May 12, 2026

Summary by CodeRabbit

  • Tests
    • Added an integration compatibility test that validates generated output includes the expected client export, ensuring code-generation behavior remains correct across configuration scenarios.

Review Change Stack

@RobinTail RobinTail added the coverage Additional tests label May 12, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 18f2d15a-8635-4cd1-8b95-3479c05c9aaf

📥 Commits

Reviewing files that changed from the base of the PR and between 5dc7662 and 0fb246a.

📒 Files selected for processing (1)
  • compat-test/int.spec.ts
✅ Files skipped from review due to trivial changes (1)
  • compat-test/int.spec.ts

📝 Walkthrough

Walkthrough

Added a Vitest integration compatibility test that instantiates Integration with CORS disabled and empty routing, then asserts the printed output contains export class Client.

Changes

Integration Compatibility Test

Layer / File(s) Summary
Integration test validation
compat-test/int.spec.ts
New Vitest integration test that instantiates Integration with CORS disabled and empty routing configuration, then verifies .print() output includes the export class Client declaration.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested labels

prevention

Poem

A test hops in with purpose clear,
Checking client code will appear,
Integration's dance, CORS at rest,
Print output passes the rabbit's test! 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'chore(test): Add Integration compatibility test' accurately describes the main change: adding a new compatibility test file for the Integration class.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch int-compatibility-test

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coveralls-official
Copy link
Copy Markdown

coveralls-official Bot commented May 12, 2026

Coverage Status

coverage: 100.0%. remained the same — int-compatibility-test into master

Copy link
Copy Markdown
Contributor

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

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

TL;DR — Extends the compat-test/ workspace with a smoke test that exercises Integration.create().print() against the workspace-pinned minimum-supported typescript@5.1.3. Sound scope, sound assertion; only a trailing-newline nit.

Key changes

  • Add Integration smoke test against minimum-supported peer TypeScript — new compat-test/int.spec.ts calls Integration.create({ config: { cors: false }, routing: {} }) and asserts the printed output contains export class Client, exercising the loadPeer("typescript") path under typescript@5.1.3.

Summary | 1 file | 1 commit | base: masterint-compatibility-test


Minimum-TS peer compatibility coverage for Integration

Before: compat-test/ covered DTS shape, migration rules, and quick-start runtime, but not the Integration generator.
After: A focused spec drives Integration.create().print() end-to-end, ensuring the TS factory + printer pipeline works against the pinned typescript@5.1.3.

The assertion toContain("export class Client") is anchored on documented public defaults (clientClassName="Client", variant="client"); makeClientClass in integration-base.ts even illustrates the emitted form via @example export class Client { ___ }, so the substring is a stable contract. routing: {} deliberately keeps the test fast — per-endpoint generators (zodToTs etc.) aren't exercised, but the global generators and the printer are, which is the right scope for a peer-version smoke test.

compat-test/int.spec.ts

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using Claude Opus𝕏

Comment thread compat-test/int.spec.ts Outdated
@RobinTail RobinTail merged commit 8429acb into master May 12, 2026
14 checks passed
@RobinTail RobinTail deleted the int-compatibility-test branch May 12, 2026 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

coverage Additional tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant