Commit graph

2 commits

Author SHA1 Message Date
google-labs-jules[bot]
14b6c09e3f feat: Add failure mode tests and fix WASM smoke test panic
This commit introduces a suite of tests for failure modes in the k-d tree library and resolves a persistent panic in the WebAssembly (WASM) smoke test.

Key changes:
- Adds `kdtree_failure_test.go` to test error conditions like empty inputs, dimension mismatches, and duplicate IDs.
- Fixes a `panic: ValueOf: invalid value` in the WASM module by ensuring Go slices are converted to `[]any` before being passed to JavaScript.
- Makes the JavaScript loader (`loader.js`) isomorphic, allowing it to run in both Node.js and browser environments.
- Updates the WASM `nearest` function and the corresponding JS loader to handle the "not found" case more gracefully.
- Corrects the smoke test (`smoke.mjs`) to align with the API changes and use the correct build process.
2025-11-04 11:55:03 +00:00
Snider
38a6c6aad3 Add KDTree normalization helpers and TypeScript demo with Vite 2025-11-04 02:15:04 +00:00