wavefnd / wavefnd/Wave

Add unit tests for the WebAssembly smoke runners

Open
#643 0 comments 0 reactions 0 assignees View on GitHub
good first issue help wanted needs testing
Dominant language
Rust
Stars
53
Forks
16
Avg merge
4h 22m
Merged PRs (30d)
46

Description

## Problem

`tools/run_wasm_smoke.mjs` and `tools/run_wasi_smoke.mjs` are currently exercised through the full WebAssembly CI path, but the JavaScript validation logic has no focused unit tests. Small regressions in required exports, private-export rejection, or invalid-module handling therefore require the full compiler smoke job to surface.

## Scope

Add lightweight Node tests for the existing smoke-runner behavior. Prefer the built-in `node:test` module and small generated or checked-in WebAssembly fixtures.

The focused tests should not require a Wave compiler build, LLVM, downloads, or network access. Keep the existing end-to-end WebAssembly smoke jobs.

## Completion criteria

- [ ] A valid browser-hosted smoke module is accepted.
- [ ] Missing or invalid required exports are rejected.
- [ ] Leaked `__wave_` exports are rejected.
- [ ] Invalid WebAssembly input fails with a nonzero status.
- [ ] A minimal WASI success path is covered where practical.
- [ ] The focused Node tests run in CI without replacing the existing compiler smoke coverage.

Related: #642

Contributor guide

Open the contributing guide

Research direction

Read tools/run_wasm_smoke.mjs and tools/run_wasi_smoke.mjs to identify their JavaScript validation behavior and entry points. Add lightweight Node tests using node:test with small generated or checked-in WebAssembly fixtures, then run them without a Wave compiler build, LLVM, downloads, or network access. Done means the listed export, rejection, invalid-input, WASI, and CI coverage criteria pass while the existing end-to-end smoke jobs remain.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js, wasm
Domain
compilers, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.