Socket
Socket
Sign inDemoInstall

karma-json-reporter

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karma-json-reporter

JSON reporter for Karma


Version published
Maintainers
1
Created
Source

karma-json-reporter NPM version

JSON reporter for Karma

Installation

The easiest way is to keep karma-json-reporter as a devDependency in your package.json.

{
  "devDependencies": {
    "karma": "~0.10",
    "karma-json-reporter": "~1.1"
  }
}

You can simple do it by:

npm install karma-json-reporter --save-dev

Usage

Use it as a reporter

// karma.conf.js
module.exports = function(config) {
  // ...

    // json reporter directly output stringified json
    reporters: ['json'],
    jsonReporter: {
      stdout: true,
      outputFile: 'results.json' // defaults to none
    }

  // ...
};

Output data

{
  "browsers": { // Collection of used browser
    "<browser.id>": {
      "id": "<same browser.id>",
      "fullName": String,
      "name": String,
      "state": Number,
      "lastResult": {
        "success":Number,
        "failed": Number,
        "skipped": Number,
        "total": Number,
        "totalTime": Number,
        "netTime":Number,
        "error": Boolean,
        "disconnected": Boolean
      },
      "launchId": Number
    }
  },
  "result": { // Collection result per browser
    "<browser.id>": [
      {
        "id": Number, // spec.id
        "description": String, // spec.description
        "suite": Array.of(String), // spec.suite
        "success": Boolean,
        "skipped": Boolean,
        "time": Number,
        "log": Array.of(String), // spec.log
      },
    ]
  },
  "summary": {
    "success": Number, // total number of success
    "failed": Number, // total number of fail
    "error": Boolean,
    "disconnected": Boolean,
    "exitCode": Number
  }
}

Output exemple

Keywords

FAQs

Package last updated on 29 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc