@jtex/karma-json2html
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@jtex/karma-json2html

This is a tool for converting the JSON report of karma results(generated by karma-structured-json-reporter or @jtex/karma-plugin) to HTML report.

Usage

convertion API

import { html } from '@jtex/karma-json2html';
import fs from 'fs';

const jsonReportData = {
    summary: {
        // ...
    },
    browsers: {
        // ...
    }
};
const options = {
    reportTitle: 'jtex html report title',
    focusOnFailures: true,
    collapsed: true,
    logoFile: '/path/to/logo.png',
    data: jsonReportData
};

const htmlContent = html(options);

fs.writeFile('/path/to/jtex-report.html', htmlContent);

Integration into karmajs

Refer to @jtex/karma-plugin.

Package Sidebar

Install

npm i @jtex/karma-json2html

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

63.8 kB

Total Files

20

Last publish

Collaborators

  • y1j2x34