Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 534 Bytes

README.md

File metadata and controls

29 lines (20 loc) · 534 Bytes

node-test-parser

CI

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