Skip to content

test: add unit tests for bootstrap and register functionality #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

ahnv
Copy link
Member

@ahnv ahnv commented Jun 2, 2025

No description provided.

@ahnv ahnv requested a review from Copilot June 2, 2025 16:09
Copy link

@Copilot 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 adds unit tests for both the bootstrap and register functionalities while updating configuration and project setup files. Key changes include adding new test cases for sanitizer behavior and upload provider registration, updating TypeScript configuration files, and revising package scripts and settings.

Reviewed Changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tsconfig.test.json New TS config for test environment
server/tsconfig.json Updated TS config to exclude test files
server/tests/utils/* Added various test utility mocks and schema definitions
server/tests/register.test.ts Added tests covering sanitizer URL conversion logic
server/tests/bootstrap.test.ts Added tests for bootstrap functions including config and permissions
server/src/register.ts Updated register implementation with early exit when no endpoint
server/src/controllers/webhook.ts Refactored webhook service call formatting
server/src/bootstrap.ts Exported extra functions for testing
package.json & jest.config.ts Updated build, lint, test, and coverage configurations
common/tsconfig.json & common/pluginId.ts Updated TS config includes and plugin identifier adjustments
admin/src/utils/url.ts Minor code style improvements
.vscode/settings.json Minor formatting change
Comments suppressed due to low confidence (1)

server/tests/register.test.ts:39

  • [nitpick] There are two tests with the description 'should not convert to imagekit url' in this file, which could be confusing. Consider renaming one of them to more clearly indicate the specific conditions or expectations being tested.
it('should not convert to imagekit url', async () => {

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