Skip to content

Fix single generation tests - #421

Draft
thinklanguages wants to merge 1 commit into
mainfrom
qyrbwo-codex/fix-url-parsing-issue-in-generation-api
Draft

Fix single generation tests#421
thinklanguages wants to merge 1 commit into
mainfrom
qyrbwo-codex/fix-url-parsing-issue-in-generation-api

Conversation

@thinklanguages

@thinklanguages thinklanguages commented Jun 26, 2025

Copy link
Copy Markdown
Owner

Summary

  • keep mocks active between tests in single generation test suite
  • ensure NuclenStartGeneration uses stubbed nuclenFetchWithRetry

Testing

  • composer lint (fails: composer not installed)
  • composer test (fails: composer not installed)
  • npx vitest run tests/frontend/nuclen-admin-single-generation.test.ts (fails: npm registry blocked)

https://chatgpt.com/codex/tasks/task_e_685d21ef313083278859ff6dd6057f55

Description by Korbit AI

What change is being made?

Enhance test mocking by adding a new mock implementation for NuclenStartGeneration and replace vi.restoreAllMocks() with vi.clearAllMocks() in the test cleanup.

Why are these changes being made?

This change ensures that the NuclenStartGeneration function is properly mocked (allowing controlled test scenarios for asynchronous calls) and uses vi.clearAllMocks() instead of vi.restoreAllMocks() to clean up only the mocks set during the test without affecting any global mock state, which maintains test isolation and improves reliability.

Is this description stale? Ask me to generate a new description by commenting /korbit-generate-pr-description

@korbit-ai

korbit-ai Bot commented Jun 26, 2025

Copy link
Copy Markdown

Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment /korbit-review.

Your admin can change your review schedule in the Korbit Console

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant