Skip to content

test(browser-integration): Allow built-in 'now' frame in profile validation#21119

Open
github-actions[bot] wants to merge 1 commit into
developfrom
fix/profiling-test-allow-now-frame-no-abs-path
Open

test(browser-integration): Allow built-in 'now' frame in profile validation#21119
github-actions[bot] wants to merge 1 commit into
developfrom
fix/profiling-test-allow-now-frame-no-abs-path

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Summary

The Playwright test traceLifecycleMode_overlapping-spans was flaky because validateProfile requires every captured frame (other than fetch/setTimeout/clearTimeout) to have an abs_path. When the JS Self Profiler samples while a built-in like Date.now() / performance.now() is on the stack, the resulting frame is { function: "now" } with no file location, causing expect(frame).toHaveProperty('abs_path') to fail.

Root cause

From the failing CI run:

Error: expect(received).toHaveProperty(path)
Expected path: "abs_path"
Received path: []
Received value: {"function": "now"}
   at profiling/test-utils.ts:104

now is another browser built-in without a JS source location, the same shape as the already-allowlisted fetch/setTimeout/clearTimeout. This adds now to the same allowlist.

Fixes #21114

@github-actions github-actions Bot requested a review from a team as a code owner May 22, 2026 09:14
@github-actions github-actions Bot requested review from logaretm and mydea and removed request for a team May 22, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

0 participants