B6: add a WASM binding test suite

The WASM binding had no tests; CI only checked that artefacts existed.
Adds a wasm-bindgen-test suite covering SMA reference values, EMA
batch==streaming equivalence, RSI pure-uptrend behaviour, fallible
constructors returning JsError, and the unequal-length batch guards from
B3. Wires wasm-pack test --node into the CI wasm job. The suite
type-checks on the host; it executes under wasm-pack in CI (the local
environment is a non-rustup Rust install without the wasm32 target).
This commit is contained in:
kingchenc
2026-05-22 04:05:15 +02:00
parent 4880fea075
commit 8192e576cf
3 changed files with 72 additions and 0 deletions
+3
View File
@@ -34,6 +34,9 @@ console_error_panic_hook = { version = "0.1", optional = true }
default = []
panic-hook = ["dep:console_error_panic_hook"]
[dev-dependencies]
wasm-bindgen-test = "0.3"
[package.metadata.wasm-pack.profile.release.wasm-bindgen]
debug-js-glue = false
demangle-name-section = true