Agents authoring widgets in the Fa ecosystem need to verify their work
without hand-writing Dart tests. Two commands, both runnable from any
project depending on the package:
- jsr_widget test: the widget's real JavaScript on the QuickJS backend,
no rendering — repeatable --event (bare id or JSON with payload),
--storage seeding, --fixture fetchJson stubs, --expect-state
deep-subset assertions against jsr.exportState, --expect-console
checks, --json machine report, exit code 0/1.
- jsr_widget screenshot: the rendered tree pumped through the production
renderer into a PNG — width/height/scale/theme, repeatable pre-capture
events, --freeze-clock.
Implementation: lib/src/tooling/ holds the Flutter-free core (arg
parsing, spec JSON, matchers, pub-cache QuickJS discovery);
tool/jsr_widget_harness*.dart run as a flutter test with a JSR_TOOL_SPEC
env contract; bin/jsr_widget.dart wraps it (flutter discovery, package
root resolution via package_config.json, report extraction).
Also documents the manifest i18n keys and the dart.library.js_interop
web marker in the skills.