@cucumber/json-to-messages
TypeScript icon, indicating that this package has built-in type declarations

10.0.0 • Public • Published

cucumber/json-to-messages

A library to translate legacy JSON output from various cucumber implementations to cucumber-messages.

Currently supports output from:

  • behave
  • cucumber-java
  • cucumber-javascript
  • cucumber-ruby

Installing

You can install this tool using npm:

npm install @cucumber/json-to-messages

Using the CLI

Send the content of your json file to the CLI:

cat my_report.json | ./node_modules/.bin/json-to-messages > my_report.ndjson

By default, the tool will detect the cucumber implementation used to generate the report but you can specify it manually:

cat my_report.json | ./node_modules/.bin/json-to-messages --implementation cucumber-js > my_report.ndjson

Using as a library

import { jsonToMessages } from '@cucumber/json-to-messages'

const JSONs: Readable = ... // The JSON reports to translate
const outputStream: Writable = ... // A stream to write the messages to
jsonToMessages(JSONs, outputStream)

/@cucumber/json-to-messages/

    Package Sidebar

    Install

    npm i @cucumber/json-to-messages

    Weekly Downloads

    491

    Version

    10.0.0

    License

    MIT

    Unpacked Size

    391 kB

    Total Files

    244

    Last publish

    Collaborators

    • davidjgoss
    • cukebot