Skip to content

test: add unit tests for estimateTokenLength#6820

Merged
Leizhenpeng merged 1 commit into
ChatGPTNextWeb:mainfrom
TIANQIAN1238:feat-test-token-length
Jul 6, 2026
Merged

test: add unit tests for estimateTokenLength#6820
Leizhenpeng merged 1 commit into
ChatGPTNextWeb:mainfrom
TIANQIAN1238:feat-test-token-length

Conversation

@TIANQIAN1238

Copy link
Copy Markdown
Contributor

💻 变更类型 | Change Type

  • test

🔀 变更说明 | Description of Change

Adds test/estimate-token-length.test.ts for estimateTokenLength (app/utils/token.ts), covering the three character-weight classes (latin letters 0.25, other ASCII 0.5, non-ASCII 1.5), the empty string, and a mixed-class string.

No production code is modified.

🤖 Generated with Claude Code

Cover the three character classes (latin letters 0.25, other ASCII 0.5,
non-ASCII 1.5), the empty-string case and a mixed-class string.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Leizhenpeng
Leizhenpeng merged commit 42c44cf into ChatGPTNextWeb: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