# @shaped/json-reporter

> json output reporter for nodejs built in test runner (node:test)

Latest version **0.1.2-alpha** (published 2023-08-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @shaped/json-reporter
pnpm add @shaped/json-reporter
yarn add @shaped/json-reporter
bun add @shaped/json-reporter
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2-alpha |
| Published | 2023-08-28 |
| First published | 2023-08-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=19.8.1 |
| Dependencies | 0 |
| Unpacked size | 6.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | forbiddenera |
| Maintainers | forbiddenera |
| Keywords | node test runner json convert export reporter |

## Links

- npm: https://www.npmjs.com/package/@shaped/json-reporter
- npm.io page: https://npm.io/package/@shaped/json-reporter

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.1.2-alpha (latest) — 2023-08-28

## README

## json reporter for `node:test`

`json` output reporter for Node.js's built in test runner (`node:test`)

Outputs a JSON object of your test results.

See https://nodejs.org/api/test.html for more information about the built in test runner.

#### Usage:

From the CLI, using `--test` and outputting to `stdout`:

```shell
$ node --test-reporter=@shaped/json-reporter --test-reporter-destination=stdout --test
```

Or, if using your own test script to launch tests, outputting to `stdout`:

```shell
$ node --test-reporter=@shaped/json-reporter --test-reporter-destination=stdout test/your_test_script.js
```

You can also set `--test-reporter-destination` to a file to have the output saved to that file instead.

From Code when using the `run()` method of `node:test`, piped to `stdout`:

```javascript
import jsonReporter from '@shaped/json-reporter';

run({ files: [
		path.resolve('./test/your_test_script.js')
	]}).pipe(jsonReporter).pipe(stdout);
```

#### (C) 2023 Shaped.ca (forbiddenera)

---
_Source: https://npm.io/package/@shaped/json-reporter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
