// Runs Ghostty's unmodified wasm examples (examples/wasm/*.html) under node // with a minimal DOM stub, against the Rust-built ghostty-vt wasm module. // // node run.mjs exports // node run.mjs sgr [fix-tags] // node run.mjs key // // Output is line-oriented for the Rust test to parse. import fs from 'node:fs'; import vm from 'node:vm'; const [mode, ...args] = process.argv.slice(2); function script(html) { const m = html.match(/