function openOutputInBrowser
openOutputInBrowser(config: Config): Task<void, never>

Opens the test output in the browser qunitx uses, detached from the qunitx process. In watch mode, opens the live HTTP server URL so WebSocket-driven reloads work on file changes. In normal mode, opens the static file:// URL (the bundle is self-contained, no server needed). If config.open is a string, it is used as the browser binary/command directly (e.g. 'brave', 'google-chrome-lts').

import type { Config } from '../types.ts';

// Defined, not invoked: spawns a detached browser process.
async function maybeOpen(config: Config) {
  if (config.open) await openOutputInBrowser(config); // watch mode → live URL; else file://
}

Parameters

config: Config

Return Type

Task<void, never>

Usage

import { openOutputInBrowser } from "lib/utils/open-output-in-browser.ts";