mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-08 02:36:10 +00:00
fix(runtime): honor render fps when seeking (#1739)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { describe, it, expect } from "vitest";
|
||||
import {
|
||||
formatHttpErrorDiagnostic,
|
||||
formatConsoleDiagnostic,
|
||||
formatNavigationFailureDiagnostic,
|
||||
formatNavigationStartDiagnostic,
|
||||
formatRequestFailureDiagnostic,
|
||||
@@ -118,6 +119,37 @@ describe("isFontResourceError", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("formatConsoleDiagnostic", () => {
|
||||
it("surfaces HyperFrames page logs with a dedicated host prefix", () => {
|
||||
expect(
|
||||
formatConsoleDiagnostic("info", "[hyperframes] render runtime fps JSHandle@object", ""),
|
||||
).toEqual({
|
||||
text: "[HyperFrames] render runtime fps JSHandle@object",
|
||||
suppressHostLog: false,
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps font load errors in diagnostics but suppresses host log noise", () => {
|
||||
expect(
|
||||
formatConsoleDiagnostic(
|
||||
"error",
|
||||
"Failed to load resource: net::ERR_FAILED",
|
||||
"https://fonts.googleapis.com/css2?family=Inter",
|
||||
),
|
||||
).toEqual({
|
||||
text: "[Browser] Failed to load resource: net::ERR_FAILED",
|
||||
suppressHostLog: true,
|
||||
});
|
||||
});
|
||||
|
||||
it("preserves existing browser prefixes for generic logs", () => {
|
||||
expect(formatConsoleDiagnostic("warn", "careful", "")).toEqual({
|
||||
text: "[Browser:WARN] careful",
|
||||
suppressHostLog: false,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("navigation diagnostics", () => {
|
||||
it("redacts credentials, query strings, and fragments from diagnostic URLs", () => {
|
||||
expect(
|
||||
|
||||
Reference in New Issue
Block a user