import { createBrowserSmokeHarness } from "/test-browser-wasm-smoke-helpers.js"; import { runBrowserAppOpfsSections } from "/test-browser-wasm-smoke-app-sections.js"; import { runLinuxCncBrowserSections } from "/test-browser-wasm-smoke-linuxcnc-sections.js"; import { runBrowserOpfsPolicySections } from "/test-browser-wasm-smoke-opfs-policy-sections.js"; import { runBrowserOpfsWorkspaceSections } from "/test-browser-wasm-smoke-opfs-workspace-sections.js"; export async function runBrowserWasmSmoke({ createWasmSimulator, result }) { const harness = createBrowserSmokeHarness(result); const createSmokeSimulator = (opfs = { mountPoint: "/cnc", workspacePath: "cnc-simulator-smoke" }) => createWasmSimulator({ locateFile: (file) => `/public/${file}`, print: () => {}, printErr: () => {}, ...(opfs === undefined ? {} : { opfs }), }); const createDefaultBrowserSimulator = () => createWasmSimulator({ locateFile: (file) => `/public/${file}`, print: () => {}, printErr: () => {}, }); const withSmokeSimulator = async (action, opfs) => { const nestedSimulator = await createSmokeSimulator(opfs); try { return await action(nestedSimulator); } finally { nestedSimulator.dispose(); } }; const createHiddenAppFrame = async () => { const appFrame = document.createElement("iframe"); const appHtml = await (await fetch("/")).text(); appFrame.srcdoc = appHtml.replace( "", '