Override the cached runtime value.
Use this in test environments where the detected runtime may be incorrect (e.g., a Node.js test that should behave as a Cloudflare Worker), or when running inside a VM/isolate with dynamic globalThis behavior.
Pass null to restore auto-detection.
null
import { setRuntime } from "kinetex";setRuntime("cloudflare-workers"); // test CF behaviorsetRuntime(null); // restore detection Copy
import { setRuntime } from "kinetex";setRuntime("cloudflare-workers"); // test CF behaviorsetRuntime(null); // restore detection
Override the cached runtime value.
Use this in test environments where the detected runtime may be incorrect (e.g., a Node.js test that should behave as a Cloudflare Worker), or when running inside a VM/isolate with dynamic globalThis behavior.
Pass
nullto restore auto-detection.