• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

bakito / sealed-secrets-web / 31463533077
72%

Build:
DEFAULT BRANCH: main
Ran 11 Aug 2026 06:01AM UTC
Jobs 1
Files 12
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 Aug 2026 06:00AM UTC coverage: 71.904%. Remained the same
31463533077

push

github

web-flow
fix: Improve base64 decoding for stringData (#462)

Refactor b64 function for better decoding

Update b64 function to decode base64 strings using TextDecoder.

fix: Correct b64() helper function - should encode, not decode

The b64() test helper was incorrectly using atob() to decode input strings.
It should use btoa() to encode strings to base64. This was causing all tests
that use makeSecret() to fail with InvalidCharacterError because invalid
base64 strings were being generated.

Fixes test failures in decodeSecretData.test.js by properly encoding test
values to base64 format.

test: Add comprehensive UTF-8 multi-byte character test cases for issue #461

Add 12 new test cases to verify that the decodeSecretData function correctly
handles multi-byte UTF-8 characters without producing mojibake:

- German umlauts (ö, ä, ü)
- French accented characters (é, è, ç)
- Spanish ñ character
- Multiline values with UTF-8 characters
- Chinese, Japanese (hiragana), Cyrillic, Arabic characters
- Emoji support
- JSON format round-tripping with UTF-8
- Mixed ASCII and UTF-8 in single secret

These tests ensure that TextDecoder correctly interprets base64-decoded bytes
as UTF-8, fixing the mojibake issue where multi-byte characters were being
displayed as Latin-1 mojibake.

Fixes #461

fix: Correct b64() helper to properly encode UTF-8 strings to base64

The b64() helper function now properly handles UTF-8 encoding:
1. TextEncoder converts the UTF-8 string to bytes
2. btoa encodes those bytes to base64

This fixes test failures where multi-byte UTF-8 characters were causing
InvalidCharacterError or being decoded incorrectly as mojibake.

The key insight is that btoa() only works with Latin-1 binary strings,
so we must first convert UTF-8 strings to their byte representation
before base64 encoding.

This matches the TextDecoder approach used in decode.js for the reverse
process (base64 decode → bytes → UTF-8 string).

Update decodeSecretData.test.js

Signed-off-by: b... (continued)

540 of 751 relevant lines covered (71.9%)

0.81 hits per line

Jobs
ID Job ID Ran Files Coverage
1 31463533077.1 11 Aug 2026 06:01AM UTC 12
71.9
GitHub Action Run
Source Files on build 31463533077
  • Tree
  • List 12
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • ea4653e1 on github
  • Prev Build on main (#31300140500)
  • Next Build on main (#31830914613)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc