Registry / testing / karma-brief-reporter

karma-brief-reporter

JSON →
library0.2.2jsnpmunverified

karma-brief-reporter is a Karma test reporter plugin designed to provide concise test progress statistics and a summary of failures at the conclusion of a test run. Unlike verbose reporters that list every test outcome, this plugin focuses on displaying a single-line progress update during execution, followed by a consolidated report of any failed tests and runtime errors. It aims to reduce terminal clutter, especially in environments where screen scrolling or cursor movement is restricted. The current stable version is 0.2.2, released in May 2022. While releases are infrequent, indicating a mature and stable state, it remains functional with modern Karma versions. Key differentiators include its minimalistic output, the ability to suppress various report sections (like error highlighting, browser logs, and external stack frames), and an option for early error reporting, making it particularly suitable for CI/CD pipelines or developers who prefer a clean, focused test output.

npm install karma-brief-reporter
INSTALL
IMPORT
SIG · KARMA-BRIEF-REPORT
K
karma-brief-reporter
testingjavascriptv0.2.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

brief
// karma.conf.js module.exports = function(config) { config.set({ reporters: ['brief'] }); };
import { brief } from 'karma-brief-reporter';
Karma reporters are enabled by adding their name (e.g., 'brief') to the `reporters` array in `karma.conf.js`, not via direct JavaScript imports.
briefReporter options
// karma.conf.js module.exports = function(config) { config.set({ reporters: ['brief'], briefReporter: { suppressErrorReport: false, earlyErrorReport: true } }); };
Configuration options for the brief reporter are defined under the `briefReporter` key in the Karma configuration object.

This quickstart demonstrates how to install `karma-brief-reporter`, configure it in `karma.conf.js` to enable early error reporting and clean stack traces, and execute tests using Karma.

npm install --save-dev karma karma-brief-reporter // karma.conf.js module.exports = function(config) { config.set({ frameworks: ['jasmine'], // Example framework browsers: ['ChromeHeadless'], // Example browser files: [ 'src/**/*.js', 'test/**/*.spec.js' ], reporters: ['brief'], briefReporter: { suppressErrorReport: false, // Default: false earlyErrorReport: true, // Default: false - reports failures immediately omitExternalStackFrames: true, // Default: false - cleans up stack traces renderOnRunCompleteOnly: process.env.CI === 'true' // Recommended for CI }, // Other Karma configurations... }); }; // To run tests: npx karma start path/to/karma.conf.js
Debug
Known issues
breakingThe configuration option `suppressErrorReportDuringRun` was renamed to `earlyErrorReport` in version 0.1.1. Using the old name will result in it being ignored.
fix
Update your `karma.conf.js` to use `earlyErrorReport` instead of `suppressErrorReportDuringRun`.
affects: <=0.1.0
gotchaThe `earlyErrorReport` option, which prints failures immediately, requires `suppressErrorReport` to be explicitly set to `false`. If `suppressErrorReport` is true, early error reports will not be shown.
fix
Ensure `briefReporter: { earlyErrorReport: true, suppressErrorReport: false }` in `karma.conf.js`.
affects: >=0.1.0
gotchaThis reporter is compatible with Karma version 4.3 and above as per its peer dependencies. Using it with significantly older or very new major versions of Karma might lead to unexpected behavior or require specific fixes, although `v0.0.6` added compatibility for Karma 2.x.
fix
Refer to the `peerDependencies` in `package.json` and the Karma changelog for compatibility. Ensure your Karma version meets the `'>=4.3'` requirement or test thoroughly with newer versions.
affects: <=4.2 || >6.x
Errors
Common errors & fixes
Can not load "brief", it is not registered!
The `karma-brief-reporter` package is installed but not listed in the `reporters` array within your `karma.conf.js`.
fix
Add `'brief'` to the `reporters` array in your `karma.conf.js` file: `reporters: ['progress', 'brief']`.
TypeError: Cannot read properties of undefined (reading 'earlyErrorReport')
You are trying to configure `earlyErrorReport` or other options, but the `briefReporter` configuration object is missing or misspelled in `karma.conf.js`.
fix
Ensure your Karma config has a `briefReporter` object at the top level: `config.set({ ..., briefReporter: { earlyErrorReport: true } });`
Error: Script error for "jquery", needed by: /base/tests/main.spec.js
This is a runtime error reported by Karma through the `brief-reporter`, indicating an issue like a missing JavaScript file (e.g., via RequireJS) or a module loading failure in the browser environment.
fix
This error points to a problem in your test setup or application code, not the reporter itself. Debug the client-side execution to identify why the script dependency ('jquery' in this example) failed to load. Check `files` array in `karma.conf.js` and module loader configurations.
Upgrade
Version history
0.2.2latest on npm
Audit
Dependencies
karmarequiredPeer dependency, required for the reporter to function within the Karma test runner.
Agent activity
2 hits · last 30 days
node
2
Resources
karma-brief-reporter — npm install karma-brief-reporter · libregistry