Skip to content

Fix WASM Node export names to unblock test (ubuntu-latest, 22) workflow - #2

Closed
tahzeer with Copilot wants to merge 1 commit into
masterfrom
copilot/fix-failing-github-actions-job
Closed

tahzeer with Copilot wants to merge 1 commit into
masterfrom
copilot/fix-failing-github-actions-job

Conversation

Copilot AI commented Jun 5, 2026 •

Copy link
Copy Markdown
Contributor

The failing test-wasm job on Node 22 was caused by a JS/Rust binding mismatch: JS tests call camelCase methods (toJson, toCsv, toCamt053) that were not exported under those names in the WASM bindings for the failing revision.

  • Root cause addressed

    • Align WASM-exported method names with JS integration test/API expectations.
    • Ensure Node-target test builds use the dev profile path used by CI test execution.
  • WASM binding API alignment

    • Added explicit wasm_bindgen JS name mappings for export methods in crates/wasm/src/lib.rs:
      • to_json → toJson
      • to_csv → toCsv
      • to_camt053 → toCamt053
  • WASM package script adjustment

    • Updated crates/wasm/package.json build scripts so npm test uses the Node build mode that preserves expected JS-export behavior in CI.
#[wasm_bindgen(js_name = "toJson")]
pub fn to_json(&self) -> Result<String, JsValue> { ... }

#[wasm_bindgen(js_name = "toCsv")]
pub fn to_csv(&self) -> Result<String, JsValue> { ... }

#[wasm_bindgen(js_name = "toCamt053")]
pub fn to_camt053(&self) -> Result<String, JsValue> { ... }

Copilot AI changed the title [WIP] Fix failing GitHub Actions job 'test (ubuntu-latest, 22)' Fix WASM Node export names to unblock test (ubuntu-latest, 22) workflow Jun 5, 2026
Copilot AI requested a review from tahzeer June 5, 2026 11:19
@tahzeer tahzeer closed this Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants