testmock

command
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Command testmock is a tiny JSON-RPC stdio server used by transport tests. Supported methods:

ping         → returns {"ok":true}
echo         → returns params unchanged
slow         → waits params.ms before responding
errorMethod  → returns a JSON-RPC error
big          → returns a large string of params.size repeats of 'a'
crash        → exits with code 7
noisy_stderr → prints a line to stderr then replies
bad_json     → writes a malformed JSON line (no id)

The server reads newline-delimited JSON-RPC requests from stdin and writes responses to stdout, one per line.

Jump to

Keyboard shortcuts

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