Skip to content

test: add unit tests for ModalConfigValidator#6845

Merged
TIANQIAN1238 merged 1 commit into
mainfrom
test/modal-config-validator
Jul 6, 2026
Merged

test: add unit tests for ModalConfigValidator#6845
TIANQIAN1238 merged 1 commit into
mainfrom
test/modal-config-validator

Conversation

@Jeniter

@Jeniter Jeniter commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

What

Adds a focused unit-test file for ModalConfigValidator in app/store/config.ts.

Covered behaviour:

  • max_tokens clamps to [0, 512000] (default 1024 on NaN)
  • temperature clamps to [0, 2]
  • top_p clamps to [0, 1]
  • presence_penalty / frequency_penalty clamp to [-2, 2]
  • model passes through unchanged

The module participates in an import cycle, so it is loaded dynamically in beforeAll — no source changes required.

Notes

  • Additive only — no existing files are modified or removed.
  • yarn test:ci passes locally.

Part of a series of small QA-only PRs adding unit coverage for pure helpers.

Adds a small, focused, additive unit-test file (test/modal-config-validator.test.ts).
No existing files are modified or removed. yarn test:ci passes locally.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@TIANQIAN1238 TIANQIAN1238 merged commit e42b74a into main Jul 6, 2026
1 check failed
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