Skip to content

Conversation

brc-dd
Copy link
Contributor

@brc-dd brc-dd commented Jun 29, 2025

fixes #1439

@brc-dd

This comment was marked as outdated.

@zloirock
Copy link
Owner

zloirock commented Jun 29, 2025

Could you add tests to tests/unit-global and tests/compat (including toHex)? Flag, shebang, etc. are not required - it can be tested locally by manually enabling this flag in a browser.

@brc-dd
Copy link
Contributor Author

brc-dd commented Jun 29, 2025

The existing tests in tests/unit-global were failing without this PR (with flag).

assert.throws(() => fromBase64('SGVsbG8gV29ybGQ1=', null), TypeError, 'incorrect options argument #1');
assert.throws(() => fromBase64('SGVsbG8gV29ybGQ1=', 1), TypeError, 'incorrect options argument #2');

assert.throws(() => array.toBase64(null), TypeError, 'incorrect options argument #1');
assert.throws(() => array.toBase64(1), TypeError, 'incorrect options argument #2');

Looking into tests/compat...

@brc-dd
Copy link
Contributor Author

brc-dd commented Jun 29, 2025

image

(left to right - safari 18.5, firefox 141.0b3, chromium 138.0.7204.50)

image

@zloirock
Copy link
Owner

Thanks.

@zloirock zloirock merged commit 892474c into zloirock:master Jun 29, 2025
23 checks passed
@brc-dd brc-dd deleted the fix/1439-2 branch June 30, 2025 03:18
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.

Check for broken implementation of Uint8Array.prototype.toHex
2 participants