# node-test-parser

> Node.js test runner report stream parser

Latest version **3.1.0** (published 2025-08-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-test-parser
pnpm add node-test-parser
yarn add node-test-parser
bun add node-test-parser
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; has provenance; high maintenance score; high quality score.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 3.1.0 |
| Published | 2025-08-20 |
| First published | 2023-10-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 15.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 5 |
| Author | Romulo Vitoi |
| Maintainers | simoneb, eamonn.frisby, donal.moynihan, sociablesteve, ryan.roemer, bpantha |
| Keywords | test, report |

## Links

- npm: https://www.npmjs.com/package/node-test-parser
- Repository: https://github.com/nearform/node-test-parser
- Homepage: https://github.com/nearform/node-test-parser#readme
- Issues: https://github.com/nearform/node-test-parser/issues
- npm.io page: https://npm.io/package/node-test-parser

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 3.1.0 (latest) — 2025-08-20
- 3.0.0 — 2025-01-06
- 2.2.2 — 2023-11-22
- 2.2.1 — 2023-10-11

## README

# node-test-parser

![CI](https://github.com/nearform/node-test-parser/actions/workflows/ci.yml/badge.svg?event=push)
![NPM Version](https://img.shields.io/npm/v/node-test-parser)


## Installation

```shell
npm i -D node-test-parser
```

## Usage

Create a custom test reporter using the parser:

```js
// reporter.js
import parseReport from 'node-test-parser'

export default async function* jsonReporter(source) {
  const report = await parseReport(source)
  yield JSON.stringify(report, null, 2)
}
```

Run tests using the custom reporter:

```sh
node --test --test-reporter ./reporter.js
```

[![banner](https://raw.githubusercontent.com/nearform/.github/refs/heads/master/assets/os-banner-green.svg)](https://www.nearform.com/contact/?utm_source=open-source&utm_medium=banner&utm_campaign=os-project-pages)

---
_Source: https://npm.io/package/node-test-parser · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
