A Karma plugin. Report results in a hierarchical BDD-style user story format.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
.npmignore
.travis.yml
Gruntfile.coffee
LICENSE
README.md
index.js
karma-story-reporter-demo.conf.js
karma.conf.js
package.json

README.md

karma-story-reporter

A story reporter for the Karma test framework. Outputs test descriptions in hierarchical BDD-style user story format.

Installation

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

{
  "devDependencies": {
    "karma": "~0.10",
    "karma-story-reporter": "~0.1"
  }
}

You can simply do this with:

npm install karma-story-reporter --save-dev

Configuration

Minimum configuration:

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

Only setting reporters to 'story' is required - storyReporter keys are optional.

// karma.conf.js
module.exports = function(config) {
  config.set({
    reporters: ['story'],
    // these are optional
    storyReporter: {
      showSkipped:        true, // default: false
      showSkippedSummary: true  // default: false
    }
  });
};

You can pass list of reporters as a CLI argument too:

karma start --reporters story,dots

Todo

  • Output one browser at a time
  • Suppress Karma's slow test output during test run
  • Correctly indent sequential, un-nested describe blocks of same name (suites require unique ids instead of names)

For more information on Karma see the homepage.