Skip to content

Wait for Handlebars function in {{#recommendations}} test#27571

Merged
EvanHahn merged 1 commit intomainfrom
wait-for-hbs-cachepartials-properly
Apr 27, 2026
Merged

Wait for Handlebars function in {{#recommendations}} test#27571
EvanHahn merged 1 commit intomainfrom
wait-for-hbs-cachepartials-properly

Conversation

@EvanHahn
Copy link
Copy Markdown
Contributor

no ref

hbs.cachePartials is async, but we weren't waiting for it. Let's start doing that, which should make this test more reliable.

no ref

`hbs.cachePartials` is async, but we weren't waiting for it. Let's start doing that, which should make this test more reliable.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 27, 2026

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: 604e7cf9-0d7d-4c8d-ab7e-47890ee72836

📥 Commits

Reviewing files that changed from the base of the PR and between b119490 and 9caa818.

📒 Files selected for processing (1)
  • ghost/core/test/unit/frontend/helpers/recommendations.test.js

Walkthrough

The test file for recommendations is updated to handle the hbs.cachePartials call as an asynchronous operation. The changes involve importing the promisify utility, converting hbs.cachePartials into a promise-based function, and awaiting its execution within an async before hook. This replaces the previous synchronous approach. The modification affects only the test setup and does not alter the test logic itself.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: making the test wait for an async Handlebars function in the recommendations helper test.
Description check ✅ Passed The description is related to the changeset, explaining that hbs.cachePartials is async and the fix ensures it is awaited to improve test reliability.
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 wait-for-hbs-cachepartials-properly

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.

@EvanHahn EvanHahn merged commit 30ab483 into main Apr 27, 2026
43 checks passed
@EvanHahn EvanHahn deleted the wait-for-hbs-cachepartials-properly branch April 27, 2026 19:20
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