# karma-spec-reporter

> A Karma plugin. Report all spec-results to console (like mocha's spec reporter).

Latest version **0.0.37** (published 2026-09-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install karma-spec-reporter
pnpm add karma-spec-reporter
yarn add karma-spec-reporter
bun add karma-spec-reporter
```

## Health

**Score 63/100 (C)** — status: active.

Positive: has types package; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.0.37 |
| Published | 2026-09-03 |
| First published | 2013-05-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/karma-spec-reporter) |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 13.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 154 |
| Author | Michael Lex |
| Maintainers | mlex, hdavidzhu, tmcgee123 |
| Keywords | karma-plugin, reporter |

## Links

- npm: https://www.npmjs.com/package/karma-spec-reporter
- Repository: https://github.com/tmcgee123/karma-spec-reporter
- Homepage: https://github.com/tmcgee123/karma-spec-reporter#readme
- Issues: https://github.com/tmcgee123/karma-spec-reporter/issues
- npm.io page: https://npm.io/package/karma-spec-reporter

## Dependencies (1)

- [colors](https://npm.io/package/colors.md) 1.4.0

## Recent versions

- 0.0.37 (latest) — 2026-09-03
- 0.0.36 — 2022-12-15
- 0.0.35 — 2022-12-08
- 0.0.34 — 2022-04-11
- 0.0.33 — 2022-01-10
- 0.0.32 — 2017-12-15
- 0.0.31 — 2017-04-11
- 0.0.30 — 2017-02-24
- 0.0.29 — 2017-02-24
- 0.0.28 — 2017-02-24
- 0.0.27 — 2017-02-24
- 0.0.26 — 2016-04-07
- 0.0.25 — 2016-03-29
- 0.0.24 — 2016-02-10
- 0.0.23 — 2015-11-25
- … 22 more at https://npm.io/package/karma-spec-reporter/versions

## README

# karma-spec-reporter

[![Join the chat at https://gitter.im/mlex/karma-spec-reporter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mlex/karma-spec-reporter?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![CircleCI](https://circleci.com/gh/tmcgee123/karma-spec-reporter/tree/master.svg?style=svg)](https://circleci.com/gh/tmcgee123/karma-spec-reporter/tree/master)
[![Coverage Status](https://coveralls.io/repos/github/tmcgee123/karma-spec-reporter/badge.svg?branch=master)](https://coveralls.io/github/tmcgee123/karma-spec-reporter?branch=master)

Test reporter, that prints detailed results to console (similar to mocha's spec reporter).

## Usage

To use in your own Node.js project, just execute
```
npm install karma-spec-reporter --save-dev
```
This will download the karma-spec-reporter and add the dependency to `package.json`.

Then add ``'spec'`` to reporters in karma.conf.js, e.g.

```
reporters: ['spec']
```

Take a look at the [karma-spec-reporter-example](http://github.com/mlex/karma-spec-reporter-example) repository to see the reporter in action.

## Configuration

To limit the number of lines logged per test or suppress specific reporting, use the `specReporter` configuration in your
karma.conf.js file
``` js
//karma.conf.js
...
  config.set({
    ...
      reporters: ["spec"],
      specReporter: {
        maxLogLines: 5,             // limit number of lines logged per test
        suppressSummary: true,      // do not print summary
        suppressErrorSummary: true, // do not print error summary
        suppressFailed: false,      // do not print information about failed tests
        suppressPassed: false,      // do not print information about passed tests
        suppressSkipped: true,      // do not print information about skipped tests
        showBrowser: false,         // print the browser for each spec
        showSpecTiming: false,      // print the time elapsed for each spec
        failFast: true,             // test would finish with error when a first fail occurs
        prefixes: {
          success: '    OK: ',      // override prefix for passed tests, default is '✓ '
          failure: 'FAILED: ',      // override prefix for failed tests, default is '✗ '
          skipped: 'SKIPPED: '      // override prefix for skipped tests, default is '- '
        }
      },
      plugins: ["karma-spec-reporter"],
    ...
```

## Contributing

### Running tests

To run the tests for the index.js file, run: `npm test`

### Generating Coverage

To see the coverage report for the module, run: `npm run coverage`

---
_Source: https://npm.io/package/karma-spec-reporter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
