{"id":13414,"library":"karma-brief-reporter","title":"Karma Brief Reporter","description":"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.","status":"maintenance","version":"0.2.2","language":"javascript","source_language":"en","source_url":"https://github.com/prantlf/karma-brief-reporter","tags":["javascript","karma-plugin","karma-reporter","progress","brief","test"],"install":[{"cmd":"npm install karma-brief-reporter","lang":"bash","label":"npm"},{"cmd":"yarn add karma-brief-reporter","lang":"bash","label":"yarn"},{"cmd":"pnpm add karma-brief-reporter","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency, required for the reporter to function within the Karma test runner.","package":"karma","optional":false}],"imports":[{"note":"Karma reporters are enabled by adding their name (e.g., 'brief') to the `reporters` array in `karma.conf.js`, not via direct JavaScript imports.","wrong":"import { brief } from 'karma-brief-reporter';","symbol":"brief","correct":"// karma.conf.js\nmodule.exports = function(config) {\n  config.set({\n    reporters: ['brief']\n  });\n};"},{"note":"Configuration options for the brief reporter are defined under the `briefReporter` key in the Karma configuration object.","symbol":"briefReporter options","correct":"// karma.conf.js\nmodule.exports = function(config) {\n  config.set({\n    reporters: ['brief'],\n    briefReporter: {\n      suppressErrorReport: false,\n      earlyErrorReport: true\n    }\n  });\n};"}],"quickstart":{"code":"npm install --save-dev karma karma-brief-reporter\n\n// karma.conf.js\nmodule.exports = function(config) {\n  config.set({\n    frameworks: ['jasmine'], // Example framework\n    browsers: ['ChromeHeadless'], // Example browser\n    files: [\n      'src/**/*.js',\n      'test/**/*.spec.js'\n    ],\n    reporters: ['brief'],\n    briefReporter: {\n      suppressErrorReport: false, // Default: false\n      earlyErrorReport: true,     // Default: false - reports failures immediately\n      omitExternalStackFrames: true, // Default: false - cleans up stack traces\n      renderOnRunCompleteOnly: process.env.CI === 'true' // Recommended for CI\n    },\n    // Other Karma configurations...\n  });\n};\n\n// To run tests:\nnpx karma start path/to/karma.conf.js","lang":"javascript","description":"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."},"warnings":[{"fix":"Update your `karma.conf.js` to use `earlyErrorReport` instead of `suppressErrorReportDuringRun`.","message":"The configuration option `suppressErrorReportDuringRun` was renamed to `earlyErrorReport` in version 0.1.1. Using the old name will result in it being ignored.","severity":"breaking","affected_versions":"<=0.1.0"},{"fix":"Ensure `briefReporter: { earlyErrorReport: true, suppressErrorReport: false }` in `karma.conf.js`.","message":"The `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.","severity":"gotcha","affected_versions":">=0.1.0"},{"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.","message":"This 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.","severity":"gotcha","affected_versions":"<=4.2 || >6.x"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Add `'brief'` to the `reporters` array in your `karma.conf.js` file: `reporters: ['progress', 'brief']`.","cause":"The `karma-brief-reporter` package is installed but not listed in the `reporters` array within your `karma.conf.js`.","error":"Can not load \"brief\", it is not registered!"},{"fix":"Ensure your Karma config has a `briefReporter` object at the top level: `config.set({ ..., briefReporter: { earlyErrorReport: true } });`","cause":"You are trying to configure `earlyErrorReport` or other options, but the `briefReporter` configuration object is missing or misspelled in `karma.conf.js`.","error":"TypeError: Cannot read properties of undefined (reading 'earlyErrorReport')"},{"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.","cause":"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.","error":"Error: Script error for \"jquery\", needed by: /base/tests/main.spec.js"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null}