import { expect, test } from "bun:test";
import { PWA_CLIENT, usesMobileRuntime } from "../src/runtime.ts";
test("PWA registration is valid JavaScript and Trusted Types compatible", () => {
expect(() => new Bun.Transpiler({ loader: "js" }).transformSync(PWA_CLIENT)).not.toThrow();
expect(PWA_CLIENT).toContain('createPolicy("wrnexus-pwa"');
expect(PWA_CLIENT).toContain("createScriptURL(swUrl)");
});
test("mobile runtime is shipped only for pages using mobile or native directives", () => {
expect(usesMobileRuntime('