npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

simple-ava-html-reporter

v1.0.1

Published

Generates simple avajs automation reports for tap-json outputs

Downloads

867

Readme

Simple Ava HTML Reporter

NPM

Simple Ava HTML Reporter is a reporting module for Ava to parse the JSON output to a beautiful report. The difference between all the other reporting modules on the market is that this module has:

  • a quick overview of all tested features and scenarios
  • a test overview that can be searched / filtered / sorted

Install

Install this module locally with the following command:

npm install simple-ava-html-reporter

Save to dependencies or dev-dependencies:

npm install simple-ava-html-reporter --save
npm install simple-ava-html-reporter --save-dev

Usage

It provides simple-ava-html-reporter and some nice integration features that will make using avaJS and tap-json reporter to nicely integrate with only a few lines of code.

const report = require("simple-ava-html-reporter");

report.generate({
  jsonDir: "./test/unit/data/ava/",
  reportPath: "./.tmp/test/",
  reportName: "You can adjust this report name",
  customData: {
    title: "AVA Run info",
    data: [
      { label: "Project", value: "AVA Custom project" },
      { label: "Release", value: "1.2.3" },
      { label: "Cycle", value: "B11221.34321" },
      { label: "Execution Start Time", value: "Apr 19th 2018, 02:31 PM EST" },
      { label: "Execution End Time", value: "Apr 19th 2018, 02:56 PM EST" }
    ]
  }
});

Options

jsonDir

  • Type: String
  • Mandatory: Yes

The directory that will hold all the generated JSON files, relative from where the script is started.

N.B.: If you use a npm script from the command line, like for example npm run generate-report the jsonDir will be relative from the path where the script is executed. Executing it from the root of your project will also search for the jsonDir from the root of you project.

reportPath

  • Type: String
  • Mandatory: Yes

The directory in which the report needs to be saved, relative from where the script is started.

N.B.: If you use a npm script from the command line, like for example npm run generate-report the reportPath will be relative from the path where the script is executed. Executing it from the root of your project will also save the report in the reportPath in the root of you project.

openReportInBrowser

  • Type: boolean
  • Mandatory: No

If true the report will automatically be opened in the default browser of the operating system.

=====================================================================================
    simple Ava HTML report generated in:

    /Users/rahul/simple-ava-html-reporter/.tmp/test/index.html
========================================================================

reportName

  • Type: string
  • Mandatory: No

You can change the report name to a name you want

customData

  • Type: object
  • Mandatory: No

You can add a custom data block to the report like this

customData: {
    title: 'Run info',
    data: [
        {label: 'Project', value: 'Custom project'},
        {label: 'Release', value: '1.2.3'},
        {label: 'Cycle', value: 'B11221.34321'},
        {label: 'Execution Start Time', value: 'Nov 19th 2017, 02:31 PM EST'},
        {label: 'Execution End Time', value: 'Nov 19th 2017, 02:56 PM EST'}
    ]
}

customData.title

  • Type: string
  • Mandatory: No
  • Default: Custom data title

Select a title for the custom data block. If not provided it will be defaulted.

customData.data

  • Type: array
  • Mandatory: yes

The data you want to add. This needs to be in the format

data: [{ label: "your label", value: "the represented value" }];