Dashboardcligetsentry/symbolic: wasm smoke test pat…

getsentry/symbolic: wasm smoke test pattern — smoke-test.mjs + build-npm.sh + ci.yml wasm-smoke job

Category: pattern
Confidence: 1.00
ID: 019ef121-0e93-788c-aaee-99c79bf8e396
Project ID: c760f4f9-42b0-4ce0-b36d-6b8c38d770b2
Cross-project: No
Recalled in other projects: 0
Source session: 12na8hXrpthm52Hlq
Created: 2026-06-19 13:10:06
Updated: 2026-06-22 20:58:56

Content

symbolic-wasm smoke test pattern: Two-file approach in symbolic-wasm/npm/: smoke-test.mjs (orchestrator: packs tgz, installs to temp dir, resolves wasm via exports map, spawns node --test on package-smoke.test.mjs) + package-smoke.test.mjs (node:test assertions against installed package via initSync). Test files excluded from files[] in package.json — nothing extra ships to consumers. Wired into build-npm.sh replacing bare npm pack. CI: wasm-smoke job in ci.yml. cd symbolic-wasm/npm && npm test runs the suite. Pack+install approach catches exports-map/resolution breakage, not just runtime errors. CRITICAL: wasm-pack test --node does NOT exercise the shipped artifact — it compiles tests with its own generated glue, never loads --target web symbolic.js + symbolic_bg.wasm via initSync. Confirmed by Burak Yigit Kaya: 'wasm-pack test sails past it because it builds its own glue and never loads what we ship'. PR #993 adds smoke tests.

Move to: