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 🙏

© 2026 – Pkg Stats / Ryan Hefner

karma-xray-reporter

v1.0.0

Published

A Karma reporter for reporting test results to Xray for Jira

Readme

Karma Xray Reporter

Transforms Karma test output to Xray format which can be sent to an Xray for JIRA installation.

Usage

describe and it blocks can contain one or more JIRA issue keys in their descriptions, which will then be converted into Test Execution reports in Xray.

describe blocks with JIRA keys will get their success status from the aggregate result of all of their child it blocks (see examples).

Note that the JIRA issue keys must be keys of the test issue type, otherwise the import to Xray will fail.

Examples

Using describe blocks
// ABC-123 will be reported with a "PASS" status
describe('ABC-123 A test suite for some feature', function () {
  it('should pass', function () {
    expect(true).toBeTrue();
  });
});
Using status aggregation with describe blocks
// ABC-123 will be reported with a "FAIL" status
describe('ABC-123 A test suite for some feature', function () {

  it('should fail', function () {
    expect(false).toBeTrue();
  });

  // ABC-124 will be reported with a "PASS" status
  it('ABC-124 should pass', function () {
    expect(true).toBeTrue();
  });

});

Tagging multiple JIRA issues

// ABC-123 and ABC-124 will be reported separately, each with a "PASS" statuses
describe('A test suite for some feature', function () {
  it('ABC-123 ABC-124 should pass', function () {
    expect(true).toBeTrue();
  });
});

Configuration

// karma.conf.js
module.exports = function(config) {
  config.set({
    reporters: ['xray']
  });
};

Options

filename

Type: String

File location to write to. Defaults to xray.json if not present.

// karma.conf.js
module.exports = function(config) {
  config.set({
    reporters: ['xray'],
    xrayReporter: {
      filename: './xray.json'
    }
  });
};

version

Type: String

The version number to add to the report. Note, in order for the Xray import to succeed, this must be a valid JIRA fix version for the projects you are importing to.

// karma.conf.js
module.exports = function(config) {
  config.set({
    reporters: ['xray'],
    xrayReporter: {
      version: '1.0'
    }
  });
};

revision

Type: String

The revision to add to the report.

// karma.conf.js
module.exports = function(config) {
  config.set({
    reporters: ['xray'],
    xrayReporter: {
      revision: '1.1.0'
    }
  });
};

passLabel

Type: String

The label to use for "passed" specs. Defaults to 'PASS' if not present.

// karma.conf.js
module.exports = function(config) {
  config.set({
    reporters: ['xray'],
    xrayReporter: {
      passLabel: 'PASS'
    }
  });
};

failLabel

Type: String

The label to use for "failed" specs. Defaults to 'FAIL' if not present.

// karma.conf.js
module.exports = function(config) {
  config.set({
    reporters: ['xray'],
    xrayReporter: {
      failLabel: 'FAIL'
    }
  });
};