Skip to content

TypeScriptified test promise helper - #29135

Merged
EvanHahn merged 2 commits into
mainfrom
deferred-ts
Jul 6, 2026
Merged

TypeScriptified test promise helper#29135
EvanHahn merged 2 commits into
mainfrom
deferred-ts

Conversation

@EvanHahn

@EvanHahn EvanHahn commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

no ref

@cursor

cursor Bot commented Jul 6, 2026

Copy link
Copy Markdown

Bugbot is not enabled for this team, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f86244fa-759d-48b4-b695-ceb43ea1c290

📥 Commits

Reviewing files that changed from the base of the PR and between 1d33898 and 16024e7.

📒 Files selected for processing (13)
  • ghost/core/test/unit/frontend/apps/private-blogging/controller.test.js
  • ghost/core/test/unit/frontend/services/routing/controllers/entry.test.ts
  • ghost/core/test/unit/frontend/services/routing/controllers/rss.test.js
  • ghost/core/test/unit/frontend/services/routing/controllers/static.test.js
  • ghost/core/test/unit/frontend/web/middleware/handle-image-sizes.test.js
  • ghost/core/test/unit/server/services/api-version-compatibility/mw-version-rewrites.test.js
  • ghost/core/test/unit/server/services/auth/api-key/admin.test.js
  • ghost/core/test/unit/server/services/auth/api-key/content.test.js
  • ghost/core/test/unit/server/services/auth/session/middleware.test.js
  • ghost/core/test/unit/server/services/auth/session/store.test.js
  • ghost/core/test/unit/server/services/mail/ghost-mailer.test.js
  • ghost/core/test/unit/server/services/url/queue.test.js
  • ghost/core/test/utils/deferred.ts

Walkthrough

The deferred test utility (ghost/core/test/utils/deferred.ts) was converted from a CommonJS default export to a TypeScript-exported named function with an explicit typed signature returning {promise: Promise<void>, done: (err?: unknown) => void}. Correspondingly, twelve test files across frontend and server test suites updated their import statements to destructure {deferred} from the require call instead of assigning the module directly to a deferred variable. No test logic or behavior was otherwise changed.

Changes

Area Change
Test utility Converted deferred.ts export mechanism from CommonJS to typed ES module export
Test files (12) Updated deferred import statements to destructure the named export

Suggested labels: migration

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description is too vague to meaningfully describe the changeset. Replace it with a brief description of the actual change, such as converting the deferred test helper to TypeScript and changing its export style.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: converting the deferred test helper 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.
✨ 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 deferred-ts

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.

@nx-cloud

nx-cloud Bot commented Jul 6, 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 16024e7

Command Status Duration Result
nx run ghost:test:ci:integration ✅ Succeeded 2m 36s View ↗
nx run ghost:test:integration ✅ Succeeded 2m 44s View ↗
nx run ghost:test:legacy ✅ Succeeded 2m 52s View ↗
nx run ghost:test:e2e ✅ Succeeded 2m 19s View ↗
nx run-many -t test:unit -p ghost ✅ Succeeded 29s View ↗
nx run-many -t lint -p ghost ✅ Succeeded 35s View ↗

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


☁️ Nx Cloud last updated this comment at 2026-07-06 15:44:25 UTC

@EvanHahn
EvanHahn enabled auto-merge (squash) July 6, 2026 15:41
@EvanHahn
EvanHahn merged commit 18b1107 into main Jul 6, 2026
33 checks passed
@EvanHahn
EvanHahn deleted the deferred-ts branch July 6, 2026 15:46
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