Skip to content

fix: refactor AI config handling in summary tests to use createAIConfigReader#507

Merged
OXeu merged 1 commit into
openRin:mainfrom
c-c-epr:fix/test
May 7, 2026
Merged

fix: refactor AI config handling in summary tests to use createAIConfigReader#507
OXeu merged 1 commit into
openRin:mainfrom
c-c-epr:fix/test

Conversation

@c-c-epr

@c-c-epr c-c-epr commented May 6, 2026

Copy link
Copy Markdown
Contributor

This pull request refactors the ai-summary.test.ts unit tests to remove the dependency on the mocked getAIConfig function and instead use a local helper to provide AI configuration. This makes the tests more self-contained and easier to maintain.

Test refactoring and simplification:

  • Replaced the use of the getAIConfigMock and its associated mocking of the ../db-config module with a new createAIConfigReader helper function that simulates the AI configuration directly within the test.
  • Updated all test cases to use the new serverConfig object created by createAIConfigReader, removing the need for the old mock and passing the config directly to generateAISummaryResult. [1] [2] [3] [4]

@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown

@OXeu OXeu merged commit f442c14 into openRin:main May 7, 2026
7 checks passed
@c-c-epr c-c-epr deleted the fix/test branch May 7, 2026 14:13
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