Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
  • Loading branch information
Lms24 authored Jan 7, 2026
commit 3b6d45ef89f689cd4582747b22b9cecf5133ae03
7 changes: 1 addition & 6 deletions packages/core/test/lib/utils/time.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,12 @@ describe('browserPerformanceTimeOrigin', () => {
it('caches `undefined` result', async () => {
vi.stubGlobal('performance', undefined);

// Get a fresh module instance
const timeModule = await import(`../../../src/utils/time?update=${Date.now()}`);

// Call browserPerformanceTimeOrigin multiple times
const result1 = timeModule.browserPerformanceTimeOrigin();

// All should be undefined
expect(result1).toBeUndefined();

// Now set performance to a valid object - if caching works, the result should still be undefined
// because the first call should have cached the undefined result

vi.stubGlobal('performance', {
timeOrigin: 1000,
now: () => 100,
Expand Down
Loading