Skip to content

TypeScriptified session controller tests - #31044

Merged
EvanHahn merged 1 commit into
mainfrom
typescriptify-session-test
Sep 28, 2026
Merged

EvanHahn merged 1 commit into
mainfrom
typescriptify-session-test

Conversation

@EvanHahn

Copy link
Copy Markdown
Contributor

no ref

@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: TryGhost/Ghost/.coderabbit.yaml

Review profile: QUIET

Plan: Essentials

Run ID: 0fb85795-9e26-46f3-bbea-d8a6af4f9d0f

📥 Commits

Reviewing files that changed from the base of the PR and between 64bd4e9 and 334521f.

📒 Files selected for processing (1)
  • ghost/core/test/unit/api/canary/session.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: Detect Tinybird changes
  • GitHub Check: Setup
  • GitHub Check: Analyze (actions)
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (3)
Review whether tests prove changed behaviour, meaningful error/edge paths, and externally observable contracts without coupling to implementation details.

⚙️ CodeRabbit configuration file

Files:

  • ghost/core/test/unit/api/canary/session.test.ts
Review lens: "where does this data become trusted?" Boundary data (HTTP input, external API/SDK responses, env/config, DB/filesystem reads, queue/webhook/event payloads) is `unknown` until validated — Zod by default.

⚙️ CodeRabbit configuration file

Files:

  • ghost/core/test/unit/api/canary/session.test.ts
Prioritise concrete correctness, security, data-integrity, compatibility, and regression risks.

⚙️ CodeRabbit configuration file

Files:

  • ghost/core/test/unit/api/canary/session.test.ts
🔇 Additional comments (1)
ghost/core/test/unit/api/canary/session.test.ts (1)

1-24: LGTM!

Also applies to: 44-44, 65-65, 72-72, 92-92, 108-108, 128-128, 139-139, 159-159, 176-176, 196-196, 222-222


Walkthrough

The session controller test replaces CommonJS imports with TypeScript imports. It adds local TestRequest and SessionMiddleware types. Four request fixtures use TestRequest, and middleware and error callbacks receive explicit parameter types. Test behavior and assertions are unchanged.

Priority: ⬇️ Low

Change: Other

Merge Risk: ⚪ Minimal · up to 33452

This change only updates session-test imports and typing; the imports preserve runtime behavior, and no material merge risk is established.

🚥 Pre-merge checks | ✅ 5 | ❓ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is "no ref", which is too vague to confirm that it describes the TypeScript conversion of the session controller tests. Add a brief description of the changes, such as converting the session controller tests to TypeScript while preserving test behavior and assertions.
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: converting the session controller tests to TypeScript.
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.
Type-Safe Boundaries ✅ Passed PASS. The authoritative diff changes only ghost/core/test/unit/api/canary/session.test.js to .ts. The added TestRequest and SessionMiddleware types are in a test file, and the check explicitly…
New Files Are Typescript ✅ Passed PASS: The pull request renames the pre-existing ghost/core/test/unit/api/canary/session.test.js to session.test.ts (R084). It does not add a new .js, .jsx, .cjs, or .mjs source file. The…
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

@nx-cloud

nx-cloud Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

🤖 Nx Cloud AI Fix

Ensure the fix-ci command is configured to always run in your CI pipeline to get automatic fixes in future runs. For more information, please see https://nx.dev/ci/features/self-healing-ci


View your CI Pipeline Execution ↗ for commit 64bd4e9

Command Status Duration Result
nx run-many -t test:unit -p ghost ✅ Succeeded 41s View ↗
nx run ghost-monorepo:lint:boundaries ✅ Succeeded <1s View ↗
nx run-many -t lint -p ghost ✅ Succeeded 16s View ↗
nx run @tryghost/e2e:test:fixtures ✅ Succeeded 1s View ↗
nx run-many -t test:types -p ghost ✅ Succeeded 5s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-09-28 18:20:46 UTC

@EvanHahn
EvanHahn force-pushed the typescriptify-session-test branch from 64bd4e9 to 334521f Compare September 28, 2026 18:17
@EvanHahn
EvanHahn merged commit 7394564 into main Sep 28, 2026
41 checks passed
@EvanHahn
EvanHahn deleted the typescriptify-session-test branch September 28, 2026 18:47
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