Help us shape the future of Go! Take the 2026 Go Developer Survey

wasmfixture

package
v0.56.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package wasmfixture guards the tests that load the echo app fixture (internal/wasmplugin/testdata/echo/echo.wasm): the module is built, and it was built from the sources beside it.

⚠⚠ echo.wasm is a build artefact nobody commits. A tree that merged a change to the fixture's main.go or manifest.json keeps the module it built before: on 2026-09-25 four tests of #64 failed on main with a bare 502 ("gather" is not an action of the module that was loaded) while the branch they came from was green. CI builds the module first and is not affected; a developer tree is. A stale module is a failure with the command to run, never a skip.

Stdlib only: internal/testutil imports the API, which imports wasmplugin, so wasmplugin's own tests cannot use it.

⚠⚠ The same rule lives in TypeScript for the e2e specs that install the module (e2e/helpers/echoFixture.ts): on the v0.50.0 pretag spec 192 ran a stale echo.wasm, because the e2e side only asked whether the file existed. Change the two together; web/tests/deploy/echoFixture.test.ts reads the file set below and holds the TypeScript one to it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Require

func Require(t testing.TB, wasm string)

Require skips a test when the module was never built (it fails instead where FILEX_REQUIRE_WASM_FIXTURE is set, as on CI), and fails it when the module is older than its sources.

func Stale

func Stale(wasm string) (string, error)

Stale reports the newest source file in the module's directory that is newer than the module, or "" when the module is at least as new as all of them. Sources are the .go and .json files and go.mod/go.sum.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL