Skip to content

test: add unit tests for encodeBase64 utility (#86) - #99

Open
jaenil wants to merge 1 commit into
ContextVM:masterfrom
jaenil:feat/base64-tests
Open

jaenil wants to merge 1 commit into
ContextVM:masterfrom
jaenil:feat/base64-tests

Conversation

@jaenil

@jaenil jaenil commented Sep 18, 2026

Copy link
Copy Markdown

Closes #86

Summary

Added comprehensive unit tests for encodeBase64 in src/core/utils/base64.ts:

  • Empty string input
  • Standard ASCII strings (e.g. Basic Auth credentials)
  • Zero, one, and two-byte padding variants (Man, Ma, M)
  • Multi-byte UTF-8 sequences (accents like é, umlauts ä/ö, and 3-byte Japanese hiragana こんにちは)
  • Deterministic output and known test vectors
    Test-only change co-located at src/core/utils/base64.test.ts, no production code touched.

Local Verification

  • bun test src/core/utils/base64.test.ts -> 9 pass / 0 fail
  • bun run lint -> clean
  • bun run typecheck -> clean

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.

test(core): add UTF-8 Base64 regression cases

1 participant