testutil

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package testutil hosts the shared test infrastructure landed in M9.

The package consolidates the mock GraphQL / REST RoundTrippers and golden-file helpers that M1-M7 grew ad-hoc across 8+ test files. Per [docs/design/10-testing-deployment.md §2 mocks-の設計] + [docs/design/16-tasks-mvp.md Phase M9 (T-118..T-125)], the canonical surface lives here so future tests reuse one well-tested helper set instead of copying scattered scaffolding.

Sub-packages:

  • mocks/ — RESTMux (http.RoundTripper) + GraphQLMux (Doer) + PluginContext builder. Fixture files dispatched from tests/fixtures/github/{rest,graphql}/<name>.json.
  • golden/ — Compare / CompareSVG / CompareJSON family unified around the existing -update flag (declared in tests/integration/output_json_test.go).

Scope guarantee: testutil is an adopted M9 surface per the project constitution principle III. No production code path imports this package — it is consumed exclusively by *_test.go files.

Directories

Path Synopsis
Package golden hosts the M9 unified golden-file workflow: Compare / CompareSVG / CompareJSON sharing the `-update` flag declared in tests/integration/output_json_test.go.
Package golden hosts the M9 unified golden-file workflow: Compare / CompareSVG / CompareJSON sharing the `-update` flag declared in tests/integration/output_json_test.go.
Package mocks hosts the M9 shared mock RoundTrippers + PluginContext builder consumed by `*_test.go` files across the project.
Package mocks hosts the M9 shared mock RoundTrippers + PluginContext builder consumed by `*_test.go` files across the project.
Package svgcontent extracts the *semantic* (visible / structural) content of a rendered metrics SVG so tests can assert on what a viewer actually sees — not on byte equality or pixel height.
Package svgcontent extracts the *semantic* (visible / structural) content of a rendered metrics SVG so tests can assert on what a viewer actually sees — not on byte equality or pixel height.

Jump to

Keyboard shortcuts

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