Files
hyperframes/packages/core/src/inline-scripts/hyperframesRuntime.engine.test.ts
T
Miguel Ángel b6de25391a fix(runtime): a composition script that shadows console no longer breaks the render runtime (#6119)
A script with a top-level const console = ... hides the global from every runtime call to console.info/warn. The runtime build now maps console to globalThis.console.
2026-10-23 07:53:26 +00:00

11 lines
446 B
TypeScript

// @vitest-environment node
import { describe, expect, it } from "vitest";
import { buildHyperframesRuntimeScript } from "./hyperframesRuntime.engine";
describe("buildHyperframesRuntimeScript", () => {
it("reaches console through globalThis so a composition's own `const console` cannot break it", () => {
const script = buildHyperframesRuntimeScript({ minify: false });
expect(script).toContain("globalThis.console.info(");
});
});