npm.io
3.1.0 • Published 1 year ago

node-test-parser

Licence
MIT
Version
3.1.0
Deps
0
Size
15 kB
Vulns
0
Weekly
0
Stars
5

node-test-parser

CI NPM Version

Installation

npm i -D node-test-parser

Usage

Create a custom test reporter using the parser:

// 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:

node --test --test-reporter ./reporter.js

banner

Keywords