mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-18 16:08:56 +00:00
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.
11 lines
446 B
TypeScript
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(");
|
|
});
|
|
});
|