New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

karma-json-result-reporter

Package Overview
Dependencies
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karma-json-result-reporter

test results as json file

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

Karma JSON result reporter

npm version Travis

This is a karma reporter that will export your test data in the form of JSON but keys all describe contexts such as:

{
  "My Feature": {
    "should have a passing test": {
      "log": [],
      "time": 12,
      "status": "PASSED"
    },
    "might have a failing test": {
      "log": [
          "Expected undefined to equal 'input'."
          "http://localhost:9879/......./display.spec.js:44:36"
      ],
      "time": 14,
      "status": "FAILED"
    },
    "My Other Feature": {
      "should have a skipped test": {
          "log": [],
          "time": 0,
          "status": "SKIPPED"
      }
    }
  }
}

If an error occurs in the browser, will be written as

{
    "__BROWSER_ERRORS__": [
        "SyntaxError: Parse error",
        "at http://localhost:9877/base/app.spec.js?8e5e93760e0333550c0c67b01e552002b52e0166:31"
    ]
}

Installation

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

In your karma.conf.js add

  • 'karma-json-result-reporter' to your plugins
  • 'json-result' to your reporters
plugins: [
    ...
    'karma-json-result-reporter',
    ...
  ];

reporters: [
    'json-result'
    ...
  ],

You will also need to set the location that you need to output your JSON file.

jsonResultReporter: {
  outputFile: "karma-result.json",
  isSynchronous: true (optional, default false)
}

karma-json-result-reporter is inspired by karma-spec-json-reporter

Keywords

FAQs

Package last updated on 17 Oct 2016

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