Skip to content

Conversation

@cameroncooke
Copy link
Owner

@cameroncooke cameroncooke commented Jan 8, 2026

Summary

  • add tsconfig.tests.json to typecheck all tests
  • add npm scripts for test typechecking

Testing

  • not run (config-only change)

Note

Introduces TypeScript typechecking for tests.

  • Adds tsconfig.tests.json to typecheck Vitest tests (includes vitest/globals types)
  • Adds typecheck:tests and typecheck:all npm scripts in package.json

Written by Cursor Bugbot for commit 65a99c9. This will update automatically on new commits. Configure here.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 8, 2026

Open in StackBlitz

npm i https://pkg.pr.new/cameroncooke/XcodeBuildMCP/xcodebuildmcp@171

commit: 65a99c9

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 8, 2026

Walkthrough

This change introduces TypeScript type checking specifically for test files. A new TypeScript configuration file (tsconfig.tests.json) is added that extends the base configuration, enables the noEmit flag, and targets test files whilst excluding generated and plugin-related source files. Two npm scripts are added to package.json to enable running type checks: one that validates test files specifically, and another that runs both the existing type check script and the new test type check script sequentially.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a TypeScript configuration for test typechecking.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description clearly and accurately describes the changes made: adding tsconfig.tests.json for TypeScript typechecking of tests and corresponding npm scripts.

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


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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
package.json (1)

31-31: Remove redundant --noEmit flag.

The --noEmit flag is redundant since tsconfig.tests.json already specifies "noEmit": true in its compiler options.

♻️ Proposed refactor
-    "typecheck:tests": "npx tsc -p tsconfig.tests.json --noEmit",
+    "typecheck:tests": "npx tsc -p tsconfig.tests.json",
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8333c1a and 65a99c9.

📒 Files selected for processing (2)
  • package.json
  • tsconfig.tests.json
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to **/*.{ts,tsx} : Use TypeScript file extensions (.ts) for all relative imports to ensure compatibility with native TypeScript runtimes
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to **/*.{ts,tsx} : Use .js extensions only for external package imports (e.g., modelcontextprotocol/sdk/server/mcp.js)
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to **/*.test.{ts,tsx} : Import core logic functions from tool files and pass mock executors to simulate different test outcomes
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to **/*.test.{ts,tsx} : Enforce strict Dependency Injection (DI) testing philosophy - completely ban the use of Vitest mocking utilities (vi.mock(), vi.fn(), vi.spyOn(), etc.)
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to **/*.test.{ts,tsx} : Use injectable executors (CommandExecutor and FileSystemExecutor) for all external interactions instead of mocking
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to **/*.{ts,tsx} : Never use .js extensions for internal file imports; always use .ts extensions
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to src/tools/**/*.ts : Organize tools into directories by their functionality and use automatic loading via plugin-based MCP architecture
📚 Learning: 2026-01-05T22:47:54.969Z
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to **/*.{ts,tsx} : Use TypeScript file extensions (.ts) for all relative imports to ensure compatibility with native TypeScript runtimes

Applied to files:

  • tsconfig.tests.json
  • package.json
📚 Learning: 2026-01-05T22:47:54.969Z
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to **/*.test.{ts,tsx} : Enforce strict Dependency Injection (DI) testing philosophy - completely ban the use of Vitest mocking utilities (vi.mock(), vi.fn(), vi.spyOn(), etc.)

Applied to files:

  • tsconfig.tests.json
📚 Learning: 2026-01-05T22:47:54.969Z
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to **/*.{ts,tsx} : Use .js extensions only for external package imports (e.g., modelcontextprotocol/sdk/server/mcp.js)

Applied to files:

  • tsconfig.tests.json
  • package.json
📚 Learning: 2026-01-05T22:47:54.969Z
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to **/*.test.{ts,tsx} : Import core logic functions from tool files and pass mock executors to simulate different test outcomes

Applied to files:

  • tsconfig.tests.json
  • package.json
📚 Learning: 2026-01-05T22:47:54.969Z
Learnt from: CR
Repo: cameroncooke/XcodeBuildMCP PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-05T22:47:54.969Z
Learning: Applies to src/tools/**/*.ts : Organize tools into directories by their functionality and use automatic loading via plugin-based MCP architecture

Applied to files:

  • package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Seer Code Review
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (3)
package.json (1)

32-32: LGTM!

The script correctly chains both type checks sequentially using &&, ensuring fail-fast behaviour if either check fails.

tsconfig.tests.json (2)

7-13: LGTM!

The include patterns correctly target test files in both src and tests-vitest directories, whilst the exclude patterns appropriately filter out generated files, plugins, and node_modules.


5-5: The base tsconfig.json does not specify a types array. Since there are no inherited types to override, the test configuration's explicit types declaration is valid and necessary for proper type resolution in the test environment.

Likely an incorrect or invalid review comment.

@cameroncooke cameroncooke merged commit d50d826 into main Jan 8, 2026
8 checks passed
@cameroncooke cameroncooke deleted the feat/test-typecheck-infra branch January 8, 2026 08:54
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.

2 participants