{"id":28490967,"url":"https://github.com/videojs/videojs-generate-karma-config","last_synced_at":"2026-01-20T18:01:29.809Z","repository":{"id":51351886,"uuid":"145040956","full_name":"videojs/videojs-generate-karma-config","owner":"videojs","description":"Generate a standard karma config, so that plugins don't need the same script in every repository.","archived":false,"fork":false,"pushed_at":"2024-05-20T22:01:23.000Z","size":835,"stargazers_count":0,"open_issues_count":1,"forks_count":4,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-10-24T09:43:55.693Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/videojs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-16T21:29:45.000Z","updated_at":"2024-05-20T19:42:04.000Z","dependencies_parsed_at":"2024-06-19T02:48:50.624Z","dependency_job_id":"5a051566-75b5-4b6a-8e09-11c7cfa41014","html_url":"https://github.com/videojs/videojs-generate-karma-config","commit_stats":{"total_commits":60,"total_committers":5,"mean_commits":12.0,"dds":"0.43333333333333335","last_synced_commit":"49407bd532539f4174946b7ba1c8f96fdf78ab6b"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/videojs/videojs-generate-karma-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videojs%2Fvideojs-generate-karma-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videojs%2Fvideojs-generate-karma-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videojs%2Fvideojs-generate-karma-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videojs%2Fvideojs-generate-karma-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/videojs","download_url":"https://codeload.github.com/videojs/videojs-generate-karma-config/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/videojs%2Fvideojs-generate-karma-config/sbom","scorecard":{"id":920775,"data":{"date":"2025-08-11","repo":{"name":"github.com/videojs/videojs-generate-karma-config","commit":"414c00b62c9bcaa3fcdd0f370f1bc594ff40e6b5"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.2,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":4,"reason":"Found 12/30 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 14 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"12 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-25T02:21:07.925Z","repository_id":51351886,"created_at":"2025-08-25T02:21:07.925Z","updated_at":"2025-08-25T02:21:07.925Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28607962,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T16:10:39.856Z","status":"ssl_error","status_checked_at":"2026-01-20T16:10:39.493Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-08T07:30:52.055Z","updated_at":"2026-01-20T18:01:29.794Z","avatar_url":"https://github.com/videojs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# videojs-generate-karma-config\n\n[![Build Status](https://travis-ci.org/videojs/videojs-generate-karma-config.svg?branch=master)](https://travis-ci.org/videojs/videojs-generate-karma-config)\n[![Greenkeeper badge](https://badges.greenkeeper.io/videojs/videojs-generate-karma-config.svg)](https://greenkeeper.io/)\n[![Slack Status](http://slack.videojs.com/badge.svg)](http://slack.videojs.com)\n\n[![NPM](https://nodei.co/npm/videojs-generate-karma-config.png?downloads=true\u0026downloadRank=true)](https://nodei.co/npm/videojs-generate-karma-config/)\n\nCurrently our karma configs are the same for most plugins, but when the default config changes a bit, every repository has\nto be updated since it is a static file. This package will provide the standard config as a module, so that updates can be\ndeployed much easier.\n\nLead Maintainer: Brandon Casey [@brandonocasey](https://github.com/brandonocasey)\n\nMaintenance Status: Stable\n\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n**Table of Contents**\n\n- [Installation](#installation)\n- [Options](#options)\n  - [`files`](#files)\n  - [`browsers`](#browsers)\n  - [`preferHeadless`](#preferheadless)\n  - [`serverBrowsers`](#serverbrowsers)\n  - [`customLaunchers`](#customlaunchers)\n  - [`ciLaunchers`](#cilaunchers)\n  - [`browserstackLaunchers`](#browserstacklaunchers)\n  - [`coverage`](#coverage)\n  - [`showQUnitUI`](#showqunitui)\n  - ['reporters'](#reporters)\n- [Code Coverage](#code-coverage)\n  - [codecov.io](#codecovio)\n  - [View the html report](#view-the-html-report)\n  - [View the report after testing](#view-the-report-after-testing)\n- [Overriding Configuration Options](#overriding-configuration-options)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## Installation\n\n```\n$ npm install --save-dev karma videojs-generate-karma-config\n```\n\nThen in your karma config do\n\n```js\nconst generateKarmaConfig = require('videojs-generate-karma-config');\n\nmodule.exports = function(config) {\n  const options = {};\n\n  config = generateKarmaConfig(config, options);\n};\n```\n## Options\nBy default all options are passed as the second argument to generateKarmaConfig.\n\n### `files`\n\n\u003e Type: `Function`\n\u003e Default: `none`\n\u003e NOTE: Be very careful with this option, this will effect ci runs as well.\n\nA function that should take one argument, the array of files that are included, and return an array of files that should be included. This is used to manually overide the files that are included ina test run\n\nDefault files that will be passed to you function\n```js\n[\n  'node_modules/video.js/dist/video-js.css',\n  'dist/*.css',\n  'node_modules/sinon/pkg/sinon.js',\n  'node_modules/video.js/dist/video.js',\n  'test/dist/bundle.js'\n]\n```\n\nExample with files function:\n\n```js\nmodule.exports = function(config) {\n  const options = {\n    files(defaultFiles) {\n      return defaultFiles.concat([\n        'some-other-file.js'\n      ]);\n    }\n  };\n\n  config = generateKarmaConfig(config, options);\n};\n```\n\n### `browsers`\n\n\u003e Type: `Function`\n\u003e Default: `none`\n\n\u003e NOTE: Be very careful with this option, this will effect ci runs as well.\n\nA function that should take one argument, the array of browsers that are about to run, and return an array of browsers that should run. This is used to manually overide the browsers that should run.\n\nExample with detected browsers:\n\n```js\nmodule.exports = function(config) {\n  const options = {\n    browsers(aboutToRun) {\n      // never test on Safari\n      return aboutToRun.filter(function(launcherName) {\n        return launcherName !== 'Safari';\n      });\n    }\n  };\n\n  config = generateKarmaConfig(config, options);\n};\n```\n\n### `preferHeadless`\n\n\u003e Type: `Boolean`\n\u003e Default: `true`\n\nIf we should prefer running headless browsers. This will change the defaults for `ciLaunchers` as well as automatic browser detection. Make sure to handle this in [`browsers`](###browsers)\n\n### `serverBrowsers`\n\n\u003e Type: `Function`\n\u003e Default: `none`\n\nA function that should return an array of browsers that should run when in static server mode (--single-run=false). It should take one argument: The default serverBrowsers array which is `[]`.\n\nExample:\n\n```js\nmodule.exports = function(config) {\n  const options = {\n    serverBrowsers(defaults) {\n      serverBrowsers.push('myTestLauncher');\n\n      return serverBrowsers;\n    }\n  };\n\n  config = generateKarmaConfig(config, options);\n};\n```\n\n### `customLaunchers`\n\n\u003e Type: `Function`\n\u003e Default: `none`\n\nA function that should return an object of karma custom launchers. It should take one argument: The default custom launchers object which is: `{}`;\n\nExample:\n\n```js\nmodule.exports = function(config) {\n  const options = {\n    customLaunchers(defaults) {\n      return Object.assign(defaults, {\n        myTestLauncher: {\n          base: 'ChromeHeadless'\n        }\n      };\n    }\n  };\n\n  config = generateKarmaConfig(config, options);\n};\n```\n\n### `ciLaunchers`\n\n\u003e Type: `Function`\n\u003e Default: `{}`\n\n\u003e NOTE: All browsers contained from this object will be run on [ci](https://www.npmjs.com/package/is-ci) unless BROWSER_STACK_USERNAME is in the enviornment!\n\nA function that should return an object containing karma custom launchers, that should all be run on ci. It should take one argument.: The default ci launchers object which empty is:\n\nExample:\n\n```js\nmodule.exports = function(config) {\n  const options = {\n    ciLaunchers(defaults) {\n      // add another browser to travis testing\n      return Object.assign(defaults, {\n        myTestLauncher: {\n          base: 'ChromeHeadless'\n        }\n      };\n    }\n  };\n\n  config = generateKarmaConfig(config, options);\n};\n```\n\n### `browserstackLaunchers`\n\n\u003e Type: `Function`\n\u003e Default: `none`\n\n\u003e NOTE: all browsers contained in this list will be run if there is an enviornment variable called BROWSER_STACK_USERNAME present!\n\nA function that should return an object containing karma custom launchers, that should all be run on browserstack. It should take one argument: The default browserstack launchers object which is:\n```js\n{\n  bsChrome: {\n    base: 'BrowserStack',\n    browser: 'chrome',\n    os: 'Windows',\n    os_version: '10'\n  },\n\n  bsFirefox: {\n    base: 'BrowserStack',\n    browser: 'firefox',\n    os: 'Windows',\n    os_version: '10'\n  },\n\n  bsSafariSierra: {\n    base: 'BrowserStack',\n    browser: 'safari',\n    os: 'OS X',\n    os_version: 'Sierra'\n  },\n\n  bsEdgeWin10: {\n    base: 'BrowserStack',\n    browser: 'edge',\n    os: 'Windows',\n    os_version: '10'\n  },\n\n  bsIE11Win10: {\n    base: 'BrowserStack',\n    browser: 'ie',\n    browser_version: '11',\n    os: 'Windows',\n    os_version: '10'\n  },\n\n  bsIE11Win7: {\n    base: 'BrowserStack',\n    browser: 'ie',\n    browser_version: '11',\n    os: 'Windows',\n    os_version: '7'\n  }\n}\n```\n\n```js\nmodule.exports = function(config) {\n  const options = {\n    BrowserstackLaunchers(defaults) {\n      // only test on Edge windows 10\n      return {\n        bsEdgeWin10: defaults.bsEdgeWin10;\n      };\n    }\n  };\n\n  config = generateKarmaConfig(config, options);\n};\n```\nFor more information on [browserstack launchers see the docs](https://github.com/karma-runner/karma-browserstack-launcher).\n\n\n### `coverage`\n\n\u003e Type: `Function`\n\u003e Default: `true`\n\nIf we should report test coverage or not, by default we do.\n\nExample with coverage turned off\n\n```js\nmodule.exports = function(config) {\n  const options = {\n    coverage: false\n  };\n\n  config = generateKarmaConfig(config, options);\n};\n```\n\n### `showQUnitUI`\n\n\u003e Type: `Boolean`\n\u003e Default: `false` if in single-run mode, `true` otherwise\n\nShow the QUnit UI in non-debug runs of Karma. This sets both `client.clearContext = false` and `client.qunit.showUI: true`.\n\nHaving `clearContext` turned off increases test reliability. However, sometimes, showing the QUnit UI during test runs is useful to track down a test that is timing out or failing, particularly on CI/Browserstack.\n\n### 'reporters'\n\n\u003e Type: 'Array'\n\u003e Default: 'dots' for CI and 'progress' for local.\n\nIf passed in, the value passed will be used. If coverage is turned on, and reporters is being set, 'coverage' must be included in the list. 'coverage' is removed from the list if the `coverage` setting is `false`.\n\n## Code Coverage\nlcov, json, and html coverage reports will be generated in `test/dist/coverage` after a test run. Unless coverage is set to false.\n\n### codecov.io\n1. install codecov globally in your ci of choice\n2. run `codecov -f test/dist/coverage/lcov.info` on your ci after testing\n\n### View the html report\n\u003e NOTE: When running as a static server the \"serverBrowsers\" will have to finish running before you see this. See [serverBrowsers](###serverBrowsers)\n1. Run your unit tests\n2. open `test/dist/coverage/index.html`\n\n### View the report after testing\n* simply run `cat test/dist/coverage/text.txt` or if you want a cross platform way use `shx`. `shx cat test/dist/coverage/text.txt`\n\n## Overriding Configuration Options\n\nAny Karma settings that have not been exposed as an option can be overriden after calling `generateKarmaConfig`.\n\nExample:\n\n```js\nmodule.exports = function(config) {\n  const options = {};\n\n  config = generateKarmaConfig(config, options);\n\n  // The reporters setting is not exposed as an option currently\n  config.reporters = ['spec'];\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvideojs%2Fvideojs-generate-karma-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvideojs%2Fvideojs-generate-karma-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvideojs%2Fvideojs-generate-karma-config/lists"}