Skip to content

test(internet): decode jwt parts as utf8 - #4268

Open
kevin9327 wants to merge 1 commit into
faker-js:nextfrom
kevin9327:test-jwt-utf8-decode
Open

kevin9327 wants to merge 1 commit into
faker-js:nextfrom
kevin9327:test-jwt-utf8-decode

Conversation

@kevin9327

Copy link
Copy Markdown
Contributor

Follow-up to #4232, as discussed in this review thread.

JSON is UTF-8, so the two existing jwt tests now decode the header and payload with utf8 instead of ascii. With ascii, any non-ASCII character in a payload (for example a company name from a non-English locale) would be decoded as the wrong characters before JSON.parse. This only touches the tests; faker.internet.jwt() itself is unchanged.

This PR was prepared with AI assistance; I reviewed the change.

@kevin9327
kevin9327 requested a review from a team as a code owner November 11, 2026 08:58
@netlify

netlify Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for fakerjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 649ac25
🔍 Latest deploy log https://app.netlify.com/projects/fakerjs/deploys/6af42e1bcfca10fece19ddee
😎 Deploy Preview https://deploy-preview-4268.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Nov 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.14%. Comparing base (5415aec) to head (649ac25).

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #4268   +/-   ##
=======================================
  Coverage   99.14%   99.14%           
=======================================
  Files        1179     1179           
  Lines        3976     3976           
  Branches      723      723           
=======================================
  Hits         3942     3942           
  Misses         29       29           
  Partials        5        5           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ST-DDT ST-DDT added p: 1-normal Nothing urgent c: test m: internet Something is referring to the internet module labels Nov 11, 2026
@ST-DDT ST-DDT added this to the v11.0 milestone Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: test m: internet Something is referring to the internet module p: 1-normal Nothing urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants