Something went wrong. Try again.
A URI parser and formatter for Zig, modelled on Python's hyperlink package, with LDAP URLs, file: URIs and sdns:// DNS stamps beside it.
Something went wrong. Try again.
12345678910111213141516171819202122232425// SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie <jeff@ocjtech.us>// SPDX-License-Identifier: MIT
/** * The node runner for `tests.js`, which `zig build test-web` invokes. * * Usage: `node web/uri.test.js path/to/uri.wasm` * * The same suite runs in a real browser under `nix flake check`; see * `browser-test.html`. */
import { readFileSync } from "node:fs";import { test } from "node:test";import assert from "node:assert/strict";
import { hasUnicode, initSync } from "./uri.js";import { suite } from "./tests.js";
const wasmPath = process.argv[2] ?? new URL("../zig-out/web/uri.wasm", import.meta.url);initSync(readFileSync(wasmPath));
console.log(`# uri.wasm from ${wasmPath}, unicode ${hasUnicode() ? "on" : "off"}`);suite({ test, assert });