Skip to content

Format custom API test assertion#952

Merged
PeterDaveHello merged 1 commit intoChatGPTBox-dev:masterfrom
PeterDaveHello:fix/custom-api-test-formatting
Mar 8, 2026
Merged

Format custom API test assertion#952
PeterDaveHello merged 1 commit intoChatGPTBox-dev:masterfrom
PeterDaveHello:fix/custom-api-test-formatting

Conversation

@PeterDaveHello
Copy link
Member

@PeterDaveHello PeterDaveHello commented Mar 8, 2026

Reformat a Prettier-mismatched assertion in the custom API unit tests.

This assertion was introduced in 65decab (#934) without matching the repository's current Prettier output, so this commit brings the file back in line with the existing formatting rules.

Summary by CodeRabbit

  • Tests
    • Updated test assertion formatting for improved readability in unit tests.

Reformat a Prettier-mismatched assertion in the custom API unit tests.

This assertion was introduced in 65decab (ChatGPTBox-dev#934) without matching the
repository's current Prettier output, so this commit brings the file
back in line with the existing formatting rules.
@PeterDaveHello PeterDaveHello requested a review from Copilot March 8, 2026 16:07
@qodo-code-review
Copy link
Contributor

Review Summary by Qodo

Format custom API test assertion for Prettier compliance

Grey Divider

Walkthroughs

Description
• Reformatted assertion to match Prettier code style
• Split single-line assertion into multi-line format
Diagram
flowchart LR
  A["Single-line assertion"] -- "Reformat to multi-line" --> B["Prettier-compliant format"]
Loading

Grey Divider

File Changes

1. tests/unit/services/apis/custom-api.test.mjs Formatting +4/-1

Reformat assertion to match Prettier style

• Reformatted assert.equal() call from single line to multi-line format
• Split arguments across separate lines with proper indentation
• Maintains identical assertion logic and behavior

tests/unit/services/apis/custom-api.test.mjs


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Mar 8, 2026

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on improving code consistency by addressing a minor formatting discrepancy in the unit tests for the custom API service. It ensures that a specific assertion statement now conforms to the established Prettier output, enhancing the overall maintainability and readability of the codebase.

Highlights

  • Code Formatting: Reformatted an assert.equal statement within the custom-api.test.mjs file to align with the project's Prettier configuration, resolving a previously introduced formatting mismatch.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • tests/unit/services/apis/custom-api.test.mjs
    • Reformatted an assert.equal statement to match Prettier's output.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 8, 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: f1fed859-b539-4368-b2af-316f591b3b00

📥 Commits

Reviewing files that changed from the base of the PR and between f142167 and 0751ff1.

📒 Files selected for processing (1)
  • tests/unit/services/apis/custom-api.test.mjs

📝 Walkthrough

Walkthrough

A test assertion in the custom API test file was reformatted from a single-line statement to a multi-line format. The predicate and expected value remain unchanged, preserving all test logic and behavior.

Changes

Cohort / File(s) Summary
Test Assertion Formatting
tests/unit/services/apis/custom-api.test.mjs
Reformatted null-check assertion from single-line to multi-line structure; logic unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~3 minutes

Suggested labels

Review effort 2/5

Poem

A humble test, made neat and wide,
One line stretched out with gentle pride,
The assertions dance in vertical grace,
Same checks, but now with breathing space! 🐰✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: reformatting an assertion in the custom API test file to match Prettier standards, which aligns with the file-level summary and PR objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request applies Prettier formatting to a test assertion to align with the project's coding style. The change is purely stylistic. I have one suggestion to further improve the readability of the assertion by using a more idiomatic array method.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR brings custom-api unit tests back into alignment with the repository’s Prettier formatting by reformatting a single assertion that was previously mismatched.

Changes:

  • Reformat a single assert.equal(...) call to match the multiline argument style used elsewhere in the test file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@PeterDaveHello PeterDaveHello merged commit b1d6aab into ChatGPTBox-dev:master Mar 8, 2026
7 checks passed
@PeterDaveHello PeterDaveHello deleted the fix/custom-api-test-formatting branch March 8, 2026 16:50
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