npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kaizenreport/kensho-go

v0.1.1

Published

Convert `go test -json` output into a kensho-results/ bundle so the Kensho CLI can render a rich HTML report.

Downloads

300

Readme

@kaizenreport/kensho-go

Convert go test -json output into a Kensho v1 results bundle so the Kensho CLI can render a rich static HTML report.

Go's standard test runner has no plugin system, so this adapter ships as a Node-based CLI that consumes the structured JSON go test already emits. Drop the optional go-helper module into your test code if you want first-class steps, attachments, labels and links — same shape as kensho-pytest and the JS adapters.

One-liner

go test -json ./... | npx kensho-go --output kensho-results
npx kensho generate
npx kensho open

Install

pnpm add -D @kaizenreport/kensho-go @kaizenreport/kensho
# or
npm install --save-dev @kaizenreport/kensho-go @kaizenreport/kensho

Usage

# pipe the JSON stream straight in
go test -json ./... | npx kensho-go --output kensho-results

# or save it first (handy in CI for re-runnable conversions)
go test -json ./... > gotest.json
npx kensho-go --input gotest.json --output kensho-results

# merge multiple files
npx kensho-go --input unit.json --input integration.json --output kensho-results

| Flag | Effect | | ------------------------------- | --------------------------------------------------------- | | --input <file>, -i | Read events from a file. Pass multiple times to merge. | | --output <dir>, -o | Output directory (default kensho-results). | | --project-name <name> | Project name to embed in run.json. | | --project-slug <slug> | Project slug for the platform. | | --run-id <id> | Override the auto-generated run id. | | --subtests cases\|children | cases (default) — every t.Run becomes its own case. children — sub-tests roll up as nested steps under the parent. |

Mapping (go test -json → Kensho)

| Action | Effect | | ------------ | ------------------------------------------------------------- | | run | Open a case (or sub-case) with its startedAt. | | output | Append the line to case.logs[]. KENSHO_META: lines from the helper module are parsed out separately. | | pass | Close the case with status: 'pass' and duration from Elapsed. | | fail | Close with status: 'fail'. The captured output becomes errors[].stack. | | skip | Close with status: 'skip'. | | panic: in output | Forces status: 'fail' (Go has no broken concept; the converter reserves it for events with no terminal action — usually a build failure). |

Stable case IDs come from <Package>::<Test> hashed via the same FNV-1a-based algorithm the JS adapters use, so a Go package's history lines up with other runs of the same suite on the platform.

Severity is detected from the test name (Test_blocker_*, Test_critical_*, …) or from sub-test names (t.Run("severity:critical", …), t.Run("@critical")). Inline @tag substrings in the test name become case.tags.

Optional Go helper module

For first-class metadata, drop the helper module under packages/go/go-helper/ into your project (it's a separate Go module — go get it directly from this repo, or vendor it):

package mything

import (
    "testing"
    kensho "github.com/kaizenreport/kensho-go-helper"
)

func TestLoginHappyPath(t *testing.T) {
    kensho.Severity(t, "critical")
    kensho.Feature(t, "Authentication")
    kensho.Label(t, "team", "growth")
    kensho.Link(t, "https://jira.example.com/browse/PROJ-123",
        kensho.LinkOpts{Kind: "jira", Label: "PROJ-123"})

    kensho.Step(t, "open the login page", func() {
        kensho.Step(t, "warm up CDN", func() {
            // …
        })
    })

    kensho.Step(t, "submit credentials", func() {
        // …
    })

    kensho.Attach(t, "/tmp/login.png", kensho.AttachOpts{Kind: "screenshot"})
}

| Helper | What it does | | ------------------------------------------ | ------------------------------------------------------- | | kensho.Step(t, title, func() { … }) | Opens a Kensho step. Nests automatically. Marks fail on panic or t.Failed(). | | kensho.Attach(t, path, opts…) | Registers a file. The Node CLI copies it into kensho-results/attachments/<caseId>/. | | kensho.Label(t, key, value) | Adds a free-form key=value to case.labels. | | kensho.Link(t, url, opts…) | Adds a hyperlink. | | kensho.Severity(t, value) | Sets case.severity. | | kensho.Feature/Epic/Scenario(t, value) | Populates case.behavior.*. | | kensho.Tag(t, value) | Adds a tag. | | kensho.Parameter(t, name, value, opts…) | Records a parameter (table-driven inputs). |

The helper writes nothing to stdout — only KENSHO_META: {...} lines via t.Logf. Outside of go test -json the lines are harmless test log output.

Why a Node CLI?

Go's std testing package doesn't expose a plugin / reporter API, but go test -json is a stable, structured stream. Routing through the same Node CLI used by the rest of the toolchain keeps the install footprint zero-Go-dependency for the converter and zero-Node-dependency for users who only want the helper module.

License

Apache-2.0.