Skip to content

Conversation

@lionel-rowe
Copy link
Contributor

Fixes #6814

// deno-lint-ignore no-explicit-any
const Temporal: any = (globalThis as any).Temporal ??
new Proxy({}, { get: () => {} });
const Temporal = (globalThis as any).Temporal ?? Object.create(null);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly can't remember why I made this a proxy originally, it's just unnecessary complexity. Hope this tiny refactor is OK to include here and doesn't need its own PR

@codecov
Copy link

codecov bot commented Sep 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.16%. Comparing base (2e717fd) to head (f12c527).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6821      +/-   ##
==========================================
- Coverage   94.16%   94.16%   -0.01%     
==========================================
  Files         573      573              
  Lines       42393    42404      +11     
  Branches     6730     6734       +4     
==========================================
+ Hits        39921    39928       +7     
- Misses       2422     2425       +3     
- Partials       50       51       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 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.

@kt3k kt3k changed the title feat(assert): add support for checking ArrayBuffer equality fix(assert): add support for checking ArrayBuffer equality Sep 19, 2025
Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed this fixes the issue, and also the diff expression in the error message seems reasonable:

error: AssertionError: Values are not equal.


    [Diff] Actual / Expected


    ArrayBuffer {
-     [Uint8Contents]: <01 02 03>,
+     [Uint8Contents]: <02 02 04>,
      byteLength: 3,
    }

  throw new AssertionError(message);
        ^
    at assertEquals

LGTM

@kt3k kt3k merged commit 95c1d02 into denoland:main Sep 19, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@std/assert/{assertEquals ,assertNotEquals} not handle ArrayBuffer correctly

2 participants