Skip to content

Refactor unit tests and utility functions for improved readability an…#375

Merged
KoblerS merged 2 commits intomainfrom
fix-formatting
Feb 16, 2026
Merged

Refactor unit tests and utility functions for improved readability an…#375
KoblerS merged 2 commits intomainfrom
fix-formatting

Conversation

@KoblerS
Copy link
Collaborator

@KoblerS KoblerS commented Feb 16, 2026

…d consistency

  • Updated jest.mock and jest.doMock syntax for consistency in unit tests.
  • Enhanced error handling and assertions in getObjectStoreCredentials and fetchToken tests.
  • Improved formatting and consistency in validateAttachmentSize tests.
  • Refactored utility functions in testUtils.js for better readability and maintainability.
  • Ensured consistent use of quotes and semicolons across all modified files.
  • Added missing newlines at the end of files where necessary.

Copy link
Contributor

@hyperspace-insights hyperspace-insights bot left a comment

Choose a reason for hiding this comment

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

Summary

This PR contains a critical error that will break CI/CD workflows. The GitHub Actions are upgraded to v6 versions that don't exist yet (as of February 2026, the latest versions are v4). This will cause immediate workflow failures when the PR is merged. The rest of the changes are legitimate formatting updates from Prettier/linting tools—primarily converting single quotes to double quotes, adding trailing commas, and ensuring consistent semicolon usage across JavaScript files.

PR Bot Information

Version: 1.17.61 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback

  • Correlation ID: 05f26130-0b3c-11f1-9a62-c336afb3420d
  • Event Trigger: pull_request.opened
  • LLM: anthropic--claude-4.5-sonnet

@hyperspace-insights
Copy link
Contributor

Summary

The following content is AI-generated and provides a summary of the pull request:


Refactor: Improve Code Style and Consistency

Refactoring

This pull request introduces a comprehensive refactor across the entire codebase to improve readability, maintainability, and enforce a consistent coding style. A key part of this effort is the introduction of a Prettier check into the CI pipeline to automate and maintain code formatting moving forward.

Changes

  • CI/CD (.github/workflows/lint.yml):
    • Added a new prettier job to the workflow to ensure code style consistency.
    • Upgraded actions/setup-node and actions/checkout to v6.
  • Code Style & Formatting:
    • Applied consistent formatting across all JavaScript, JSON, and Markdown files, standardizing the use of double quotes and semicolons.
    • Improved readability by reformatting long lines and complex code blocks in files like lib/helper.js, lib/generic-handlers.js, and srv/*.js.
  • Tests:
    • Updated jest.mock and jest.doMock syntax for consistency.
    • Refactored utility functions in tests/utils/testUtils.js for better maintainability.
  • Documentation:
    • Corrected formatting and indentation in all documentation files, including README.md and CHANGELOG.md.

  • 🔄 Regenerate and Update Summary
  • ✏️ Insert as PR Description (deletes this comment)
  • 🗑️ Delete comment
PR Bot Information

Version: 1.17.61 | 📖 Documentation | 🚨 Create Incident | 💬 Feedback

  • Event Trigger: pull_request.opened
  • Correlation ID: 05f26130-0b3c-11f1-9a62-c336afb3420d
  • Output Template: Default Template
  • Summary Prompt: Default Prompt
  • LLM: gemini-2.5-pro

💌 Have ideas or want to contribute? Create an issue and share your thoughts with us!
📑 Check out the documentation for more information.
📬 Subscribe to the Hyperspace PR Bot DL to get the latest announcements and pilot features!

Made with ❤️ by Hyperspace.

#374)

…iles; add setupDeletionListener utility for improved attachment
deletion handling.

Closes #372

---------

Co-authored-by: hyperspace-insights[bot] <209611008+hyperspace-insights[bot]@users.noreply.github.com>
@KoblerS KoblerS marked this pull request as ready for review February 16, 2026 13:35
@KoblerS KoblerS requested a review from a team as a code owner February 16, 2026 13:35
@KoblerS KoblerS merged commit 4bf4c07 into main Feb 16, 2026
17 checks passed
@KoblerS KoblerS deleted the fix-formatting branch February 16, 2026 14:00
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.

3 participants