WIP: pre-existing changes from WASM browser work + test infrastructure
Accumulated changes from WASM browser development sessions: - sx_runtime.ml: signal subscription + notify, env unwrap tolerance - sx_browser.bc.js: rebuilt js_of_ocaml browser kernel - sx_browser.bc.wasm.js + assets: WASM browser kernel build - sx-platform.js browser tests (test_js, test_platform, test_wasm) - Playwright sx-inspect.js: interactive page inspector tool - harness-web.sx: DOM assertion updates - deploy.sh, Dockerfile, dune-project: build config updates - test-stepper.sx: stepper unit tests - reader-macro-demo plan update Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -306,6 +306,31 @@ if (fullBuild) {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Load web harnesses (DOM mocking, signals, rendering awareness)
|
||||
const webDir = path.join(projectDir, "web");
|
||||
for (const webFile of ["harness-web.sx", "harness-reactive.sx"]) {
|
||||
const wp = path.join(webDir, webFile);
|
||||
if (fs.existsSync(wp)) {
|
||||
const src = fs.readFileSync(wp, "utf8");
|
||||
const exprs = Sx.parse(src);
|
||||
for (const expr of exprs) {
|
||||
try { Sx.eval(expr, env); } catch (e) {
|
||||
console.error(`Error loading ${webFile}: ${e.message}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Load stepper-lib (shared stepper functions used by lib/tests/test-stepper.sx)
|
||||
const stepperLibPath = path.join(projectDir, "sx", "sx", "stepper-lib.sx");
|
||||
if (fs.existsSync(stepperLibPath)) {
|
||||
const src = fs.readFileSync(stepperLibPath, "utf8");
|
||||
const exprs = Sx.parse(src);
|
||||
for (const expr of exprs) {
|
||||
try { Sx.eval(expr, env); } catch (e) {
|
||||
console.error(`Error loading stepper-lib.sx: ${e.message}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Determine which tests to run
|
||||
|
||||
Reference in New Issue
Block a user